Add custom state to repeating group Data source

Hello there,

I cant use a custom state as data source for repeating groups and i feel this could help a lot to avoid workunits and many api calls.

from docs i get:

Data source

This is the list of things to display in the group. It can either be

  • The result of a search using ‘Do a search for,’
  • The content of a field whose type is list of things, or
  • The result of an API call through the ‘Get data from an external API.’

I need to filter results after the API call because user are going to be changing filter options frequently and i believe this will increase to much workunits and api calls.

The way i think this can be done is to populate a custom state with the api call data and then apply conditionals to repeating groups that filter this data depending on user selection.

Can this be done?

Why you cannot use a state for source of a RG? This is possible but maybe I don’t understand your case correctly…

Sorry if i didnt myself clear. I want to add a custom state ( as list) as a data source for a repeating group, yes it can be done but only with a little “hack”. Let me show you:

If i first select data type as an API call object i cant add the custom set from the same type; its not listed (dashboard page custom state).

Now if i clear the data type , i am able to see the custom state and select it:

Bubble gives me a warning about the datatype not being selected, so i proceed to select it as the api call object.

image

Now all good i can access the custom state. I think it might be a bug or something because if i look for the docs it says RP groups can only choose from other data sources.

The reason i want to do this i because i expect the users to change very often some filters to the API data, so i dont want to be making api calls with filters every time a user changes selection, instead i want only to filter a custom state data locally.

Hope it helps somebody else.

For me, this sound like a bug. I see this issue another time this week, in a different context, but same thing, I needed to copy paste the reference from another place. You should submit a ticket like I did.

Another workaround that probably work is if you set the state in the RG instead

1 Like