Forum Academy Marketplace Showcase Pricing Features

Convert list of unique id's (text) to a list of that datatype

I’m using Algolia for my search with the @ZeroqodeTeam plugin.

The way I have it implemented is that I return from Algolia a list of the unique IDs for my dataype “products”. Then I have a Repeating-Group of Products wherein, for each cell, it “Does a search for Products: Unique ID matches Algolia search unique ID: item number: current cell index #: first item”

So for each cell of the repeating group, the Algolia provided Unique ID is converted to its corresponding Product datatype.

But this has some drawbacks! Including, I cannot add extra search parameters in Bubble because this is a text list, not a product list. And I cannot use the powerful “Filter” function on the list.

I can do these things within Algolia, but I’d like to do them dynamically in Bubble after returning the Algolia search result.

So here’s what I’m trying to do:

  • Take the list of text items (Unique IDs) provided by Algolia
  • Convert this list of text Unique IDs into a list of Products (a datatype)
  • Now I can use a list of Products, rather than the original text list.

Hello @manwithaplan

Indeed the Algolia search has an important drawback of not returning search results as Bubble objects that can then be manipulated client-side. Take a look at the Quick Find Search Plugin. You don’t lose reference to your Bubble object (your datatype Products) and will then be able to use the search result as a list of Products not just a list of texts. Also, you can use different search parameter fields and even add additional filters as needed. :raised_hands:

The other option would be to use the returned Algolia Unique IDs list as a filter constraint with a Do a Search for Products, then add filtered unique id is in the returned Algolia Unique IDs list, but I don’t see this being a very efficient approach as it will add up to a lot of overhead to the total capacity used by your application.

Hope this helps and feel free to reach out to me if you have any questions :slight_smile: