Forum Documentation Showcase Pricing Learn more

Sending lists to Blockspring

I am trying to sort data in a repeating group (a list of things coming from a search) by recurring count. As an example if “Business A” existed in the search 1 time and “Business B” occurs 5 times, “Business B” would be at the top of the list since it occurs the most times in the search. I understand Bubble does not offer this ability, so I am exploring Blockspring.

Blockspring provides a block called “Sorted Unique Count List” which appears to meet the need.

I am trying to use the Blockspring Plugin and during the setup if I manually type in sample data I can successfully display the data in the correct sorted order in a repeating group.

When I use the Blockspring API it automatically populates JSON with the sample data in this format:

However if instead I want to dynamically send the API a list of business names coming from a Bubble search, how can I send that in the correct JSON format? If I simply add the search it will put all the items in a single row comma separated, so Blockspring only sees 1 row of data which prevents any sorting of things. I am hoping there is another way to populate the data source in the correct JSON format. Thanks.

Did anyone figure this out?

I have a list, comma separated in the RG when I use the debugger but it will only show the first character of the first entry.

It doesn’t seem to matter if I use the [[’’ format or not with dynamic data. I use the ‘join with ,’ expression but it doesn’t help either…

Ah well, I guess I’ll try something else :slight_smile:

I could really use the answer to this question…

1 Like

Would it work to add a number field “Count of Searches” and a number list to the thing and then upon the completion of each search run a workflow that adds a 1 to the number list for each thing in the search result RG, then add another workflow that adds the count of that number list to the “Count of Searches” field for each thing.

Then you can sort your RG by the “Count of Searches” field.

I haven’t tried it but it seems like it should work.