I am using several different api strings as data sources
And I only want to use one repeating group.
To get the intitial data source to populate - I have to reference it to the API call (as “content type”)
But when I want to change the data source - it wont allow me to use a different api query; because the “content type” of the repeating group is fixed to the initial API call.
I would like to be able to change the “content type” as a condition for repeating groups - so that I don’t have to have countless containers and repeating groups… i can use just one
(I have thought of many different ways to accomplish what I am trying to do - I think this may be the only solution - unless someone understands what I am asking and can think of something else).
- I could also see this idea being useful on a native app or something - where a single repeating group is able to display a list of posts - AND a list of users within the same element; under different conditions
Would this not cause issues with all of the elements you have inside the repeating group, such as the Text, Image, etc.?
Sounds like you are just moving the multiple container annoyance from multiple repeating groups, to multiple elements inside the repeating group, which I think could be tougher to manage then showing and hiding different repeating groups.
2 Likes
Not in this particular instance - because the data types are the same. The source is the only thing that is different (same provider however - just different query string). The JSON response is formatted in the same way with all the queries.
So “parent groups text” would populate correctly without requiring different elements, regardless of whether the Source was from query string 1,2 or 3 etc.
I can get around this issue actually by storing the items in my bubble database.
- which could actually be a better way in the long run
I see what your saying more clearly now. In any other use case other than the one I have found myself in; the feature would be a bit nonsensical haha. I agree.
My situation was this:
1 repeating group that shows posts…
1st API call that fetches posts from source A
2nd API call that fetches posts from source B
If I want to display posts from source A - my repeating group “content type” needs to be the 1st API.
But then I wanted to show posts from source B in the same repeating group (using conditions)…
But I can’t do that if the type of content for the repeating group is still “1st API”
So that’s where I found myself.
You are right though; with what you said