I’m trying to create a list of names that I get from an API data source and put that in a repeating group but it will not show the text. Any suggestions on how I can get the list of names to show up?
do you have a text element in the R.G. set to show the current cell’s name?
@boston85719 yes I do but it shows the whole list of names in each cell of the list instead of one name in a cell. So for example, if I have 10 names in a list it shows all 10 names in a text cell 10 times. Any suggestions on this?
not really sure what would be causing this except that your api call is probably requesting a list and not parsing the data to be individual items, but I don’t really have experience with API calls.
Difficult to say without seeing screenshots, at least, of what you’re trying to do, but just in case you haven’t tried this already, try setting the source of your repeating group to the list returned by the API call then for your text element, set to current cell’s [whatever is returned]'s name. Or set your RG’s content type to text and its source to the list of names being returned and then the text to current cell’s text.
@lukejamison0 you only want one of the 10 to show? But show once or 10 times?
@louisadekoya This Worked! Any idea on how to get different items in the text cell? like a Phone number or an address? Because I set the repeating groups data to the names how would I get other things?
@lukejamison0, in that case, try my first suggestion. I don’t know what data exactly your api call is returning but whatever the list is (let’s say it is a list of ‘persons’), make that the source of your Repeating Group (RG) then each of your text fields can refer to the current cell’s person’s name, phone number etc.
Below is an example where I’m getting data from the Random User Generator API and then referencing each user’s name. I could do the same for profile picture etc.
@louisadekoya so this worked Perfectly! Thanks. Now, do you have a suggestions on how to get a
map marker to show the same information on hover?
I’m afraid I haven’t done any work with maps on Bubble. If the map element/marker is in a RG and if markers have tooltips or some other text-on-hover mechanism, then it should just be like any text element and you should be able to use the exact same method to show the information. Otherwise, it’s probably worth creating another topic for it - assuming the question hasn’t already been answered in another post.
Use the R.G. that gets the information you have been working on as the datasource for your map…then set up the map ( explained in various threads on the forum ) to show what information you want on hover.