Weird challenge - repeat group results re-ordering when resubmitting same data

Hey guys,

So, we have a repeat group - on this repeat group we have a button which allows the user to reveal more information on that record.

The way we know which record should show/hide the information is that we parse the unique ids through a db query, with a form submit again.

So;
Form inputs create the search
Form submit queries external API
We group the uids from the API and check against DB
We return the results to the user with each record either showing/not showing certain data.

Works great.

If a user clicks the ‘reveal’ button on a record in the repeat this is the flow:

SC action inputs the unique ID of the record into the DB we query against.
Rerun the form with the same inputs so we can parse the data back through the DB query.
The record should now ‘display’ the new data they revealed.

The problem I have is that one of two things then happen:

  1. The record actually dissappears for some reason from the search, if I manually resubmit the form then it appears again.
  2. The results move a little, so the user might need to scroll up or down to find the record.

Both are pretty poor UX.

The repeat does have a unique key which is the same as the unique id we use.

Does anyone have any suggestions on how to tackle this? Ideally there would be a way to show/hide on that record without having to resubmit the form and the full query - but I don’t think that’s possible.

Community Page
Last updated: