I have a page showing a repeating group where the data source is a Search for X that has a bunch of simple filters based on dropdowns on the page. For example, one dropdown is for Location. When the user changes the value of the dropdown, the repeating group will automatically recalculate its results to account for the dropdown’s new value. That’s working as expected.
However, the repeating group also lets a user change some of the fields on the thing in the repeating group itself - let’s say, for example, that each row of the repeating group has its own dropdown that has autobinding with that thing’s Location, so that the user can easily update the data on the page.
The trouble / annoying thing is that if the RG is filtering on Location, and then a user updates a thing’s Location on the page, the results shown on the page also update. This is undesirable because then the results shown in the RG are jumping around.
Is there any way I can make it not do that? Is this what the :make static operator does, but requires me to set up the data source via workflows?
(The example I’m giving is a simplification of my actual setup. But ultimately, I just don’t want the results currently shown in the RG to be jumping around.)
use the :static operator at the end of the expression as your datasource for the rg
But, sounds like you have done this and the issue is related to constraints using dynamic variables. One thing you can do is add to the UI/UX a ‘set filters’ button that will then allow the search constraints to be used. Need a custom state and some other things to get it all to work, but basic idea is that a user needs to click the set filters button to change their filter values from the dropdowns etc.
Then when you edit an item in the repeating group, the order does not change but the value in the DB does (during step 1 the order was set to Name):
A drawback of this approach is that when a new entry is created for the data type, it will not be automatically added to the RG. You willl have to add a refresh button to get new data (and you can for instance notify the user about new entries by an icon that changes color etc. etc.). If needed you can add new enties at the end of the list (so that even after refresh the list order does not change:
Thanks both - the solution you’re both describing works!
For what it’s worth, I also combined this with daisy chaining, per @Andrew.Vernon 's great video, and it all works great.
For the sake of others, here are some more details on how I implemented it, on top of the instructions @gerbertdelangen wrote above:
In the daisy chain of custom events, my first one (the ‘00’ one per Andrew’s numbering) loads an initial query of things. I definitely don’t want to load all the things of the data type, so I have 1 filter on that search which corresponds to one of the filters that has a default value (in my case, a filter on creation date). No reason there can’t be more filters in this ‘base’ query
I have a workflow on the page for When the page is loaded → kick off the 00 custom event
In the daisy chain, my final event is one that takes the RG’s list and simply applies :make static