Hi all,
I am pretty new to Bubble and there is something I have been struggling with a bit. I have option sets for continents and countries (Population, Languages, Land Mass, etc ) in a repeating group. Those are coming through fine and I understand how to set these up. The API is set up OK as well but the problem is combining the two. I am hoping to connect the individual data items returned for the continent/country with their corresponding option. Example: Countries is the one option and if it loaded on let’s say to an Africa page would need to show 54 (total countries in Africa ) which comes from the API data. How do I put or sort the individual data items to match with the option. I want to be able to have all the info in individual card elements like the screenshot. Is there a way to do this in the same repeating group or would I need to have a different structure? What is the best way to do this? Any help here that would be greatly appreciated. Thanks!
Hi did you try creating Attribute for an option and define the type of Attribute as Option.
You can create both options available for both option type as option.
1 Like
Yes, thank you so much for your reply! I think I understand that part but am still am not understanding how I can attach the data from the API to have different information across cells to match with the cell display title. I am guessing it is how I am doing the dynamic expressions. Whatever information I put in the first cell is what carries across all cells. I am not sure how to separate the data from the API to match the individual options in each cell where it needs to go.
I am confused. When you say you are using option set it is assumed that you are creating data manually.
When you say you are getting the data from API, and want to create values for option set, that dose not make sense.
Either you do it manually in option set, or display them in a repeating group, or save the data in database first to show them in a repeating group later on.
Thanks and apologies for the confusion. I guess maybe I am approaching it wrong. I am just trying to figure out the best way to display the cards as in my original screenshot for dynamic pages. The title and the icon would be static for each page and the values for those would be pulled via API so would change based on the dynamic page. Perhaps it would be best to just do the cards individually instead of using a repeating group?
You can directly display data as card style, set up in your workflow from the API.
You can also save the data in database first then show them in repeating group as card style.
There is nothing to worry about any approach. Both will fulfil the result.
Since content and countries are kind of constant (not changing regularly) you would want to save them in your database first.
OK, thanks! Let me see if I can figure it out, I really appreciate it.