Dynamic Search Results

I have a list of “Orders” with fields including “Order Number,” “Shipper”, and “Receiver.”

I have these displayed in a repeating group such that, the Order Number is on top, and the shipper/receiver data are in a collapsible group.

Clicking on the Order Number Text toggles the Shipper/Receiver group.

  1. How can I make it so only one shipper/receiver group is ever shown? That is, showing any one hides all the others.

  2. And can I directly correlate the search result to do the same thing? That is, the search result will scroll to that order and show the shipper/receiver group.

I have made the search bar properly search the user’s order numbers.

You can do this using a custom state to track which RG index is “selected.” This is another application of the ideas explained here (which boil down to: “How do I know which element in an RG is the one the user is currently futzing with, so that I can [do something]?”):