This would be a new generic option for any object that is placed on a subform but it would use the code already developed for some of the globeadmin forms (see the example below).
It would be a simple checkbox property for the object, ignored if not on a subform. If checked, the 'select' filter would be displayed and populated with each unique value in alphabetical order. The behaviour would be exactly the same as with the objects subform example shown. Multiple filters on the subform could be combined with 'AND'.
The filter would not require any reloading of the subform data; it would only filter the records loaded when the form is opened/refreshed.
Welcome to the nuBuilder Forums!
Register and log in to access exclusive forums and content available only to registered users.
Register and log in to access exclusive forums and content available only to registered users.
Filtering rows on a subform [done]
-
- Posts: 115
- Joined: Tue Dec 12, 2017 11:28 pm
- Location: Aberdeen, UK
- Has thanked: 9 times
- Been thanked: 12 times
Filtering rows on a subform [done]
You do not have the required permissions to view the files attached to this post.
-
- nuBuilder Team
- Posts: 4291
- Joined: Sun Oct 14, 2018 6:43 pm
- Has thanked: 71 times
- Been thanked: 444 times
- Contact:
Re: Filtering rows on a subform
Hi Neil,
How about using Select2? The filtering could probably be done in a similar manner as in nuSortSubform() where a new top position is set for a row.
For the rows that do not need to be displayed, nuHide() can be used.
How about using Select2? The filtering could probably be done in a similar manner as in nuSortSubform() where a new top position is set for a row.
For the rows that do not need to be displayed, nuHide() can be used.
-
- Posts: 115
- Joined: Tue Dec 12, 2017 11:28 pm
- Location: Aberdeen, UK
- Has thanked: 9 times
- Been thanked: 12 times
Re: Filtering rows on a subform
Thanks for your response, kev1n.
Select 2 would be fine if that would be the easiest way to implement this. My thinking was to make use of the subform filtering code that is already in place for the 'Tab' column in the list of objects (which you developed) by converting this to a generic feature.
Neil
Select 2 would be fine if that would be the easiest way to implement this. My thinking was to make use of the subform filtering code that is already in place for the 'Tab' column in the list of objects (which you developed) by converting this to a generic feature.
Neil
-
- nuBuilder Team
- Posts: 4291
- Joined: Sun Oct 14, 2018 6:43 pm
- Has thanked: 71 times
- Been thanked: 444 times
- Contact:
Re: Filtering rows on a subform
The filtering is done by SQL and a form refresh there. That means it is fundamentally different and I'm afraid that we can't make use of that code.
-
- Posts: 115
- Joined: Tue Dec 12, 2017 11:28 pm
- Location: Aberdeen, UK
- Has thanked: 9 times
- Been thanked: 12 times
Re: Filtering rows on a subform
Thanks for letting me know, kev1n. I did not realise it was performing a form refresh - I should have looked more closely.
Looking at nuSortSubform(), perhaps its functionality could be expanding so that the filter condition (if set) is used to determine if a subform row is displayed during the rewrite?
Neil
Looking at nuSortSubform(), perhaps its functionality could be expanding so that the filter condition (if set) is used to determine if a subform row is displayed during the rewrite?
Neil
-
- nuBuilder Team
- Posts: 4291
- Joined: Sun Oct 14, 2018 6:43 pm
- Has thanked: 71 times
- Been thanked: 444 times
- Contact:
-
- nuBuilder Team
- Posts: 4291
- Joined: Sun Oct 14, 2018 6:43 pm
- Has thanked: 71 times
- Been thanked: 444 times
- Contact:
Re: Filtering rows on a subform
To filter a subform by multiple columns (based on Neil's initial version)
To-do:
To-do:
- Make it work when the subform is filtered.
- Add the ability to filter a column based on the partial match of a word
- Automatically add the populated Select element
-
- nuBuilder Team
- Posts: 4291
- Joined: Sun Oct 14, 2018 6:43 pm
- Has thanked: 71 times
- Been thanked: 444 times
- Contact:
Re: Filtering rows on a subform
Github updated with current code. It's under active development.
You do not have the required permissions to view the files attached to this post.
-
- nuBuilder Team
- Posts: 4291
- Joined: Sun Oct 14, 2018 6:43 pm
- Has thanked: 71 times
- Been thanked: 444 times
- Contact: