Hi,
I bought the Listopia plugin, but I have a problem with Keeper Data Updated Trigger.
My problem
I use Algolia to make my Bubble.io database searchable. If the user enters a search term, the Algolia plugin from Zeroqode returns a list of unique IDs of the items (episodes) that match the search term. I want to display these items (episodes) in a repeating group. To do this, I perform a āDo a searchā in Bubble with the constraint that the unique ID is in the list of IDs of the Algolia plugin. The result of this search is a list of episodes, but their order differs from the order of the unique IDs in the Algolia plugin.
My suboptimal solution
I use Listopia to re-sort the result of the āDo a Searchā bubble based on the unique IDs in Algolia. Specifically, the solution looks like this:
Step 1
I use a Keeper Element with the Data Type set to āTextā and List One = āSearch for Episodes:each itemās unique idā where the constraint is that the unique id is in the result of the Algolia plugin (see screenshot A). This keeper element therefore contains the unique IDs of the episodes in the āwrongā order.
Step 2
I use the Index Finder workflow and search for the list of unique IDs from the Algolia plugin in the keeper element from step 1 (see screenshot B).
Step 3
I use a second keeper element of the type āEpisodesā whose datasource is a āDo a searchā with the constraint that the unique ID is in the list of unique IDs from the Algolia plugin. This keeper element therefore contains the episodes (not only unique IDs) in the āwrongā order (see screenshot C).
Step 4
To get the list of episodes from step 3 into the ācorrectā order (order of the unique IDs from the Algolia plugin), I use the sub list workflow with the result from step 2 (see screenshot D). Subsequently, the result state of the keeper element from step 3 contains the episodes in the correct order.
In principle, this procedure works very well. However, I am currently still using button clicks for step 2 and step 4 to trigger the workflows.
In the future, the sorting of the list should of course happen automatically when the user enters a new search term and the list of Unique IDs in the Algolia plugin changes and thus also List One of the Keeper element from step 1.
I actually wanted to use the Keeper A Data Updated event for this. The problem, however, is that this event is triggered multiple times during a single update operation.
Even if I insert the condition āAction Name is Source Updatedā, this workflow is triggered 8 times and if I subsequently enter search terms, the event is triggered 2 times (to check this, I have inserted a number state that is increased by 1 each time the event is triggered ā see screenshot E).
Is this a bug? What am I doing wrong or how do I make sure that I really only isolate the source update? Is there maybe another way (maybe smarter way) to organize my desired result (order an item list based on a list of unique IDs)?
PS: I have already considered triggering all actions by clicking on the search button. However, it takes a moment for the Algolia search to run through and I want to avoid triggering the sorting before the search is actually finished (custom events are not an option here, as the search is triggered in the visual element and not via workflow).
I would be very grateful for any information. Best regards from Hamburg!