I have a Repeating Group that is pulling data from an API. Within the Repeating Group, I am displaying their related posts data from another API by matching to their user ID. The structure looks like this:
None of the data is stored on Bubble, it’s all external.
You can see the live version here. This is my test app, so you can see the edits made here. Be sure to reveal the hidden group that you can find under the Elements tree.
I have an input field that is showing the count of characters. I want to get the total sum of the character count from all of the cell from the Repeating Group (Posts) and display it on the parent Repeating Group (Users).
I was thinking I can get the total character count from the Repeating Group by using the custom states, but I haven’t been able to create something that works. Any suggestions?
Try the following. Create a data field for your character count for each RG, call it “Char Count” (type is number). For “Total Character Count”, do a Search for your RG for each of the individuals, ie Leanne Graham and look for “Char Count” then include :sum. It would look something like this: Search for Posts’s Char Count:sum
The API will load more data over time. So it wouldn’t make send to create a new data field for each new cell on Bubble. I rather not create a data field, would it not be possible to store the total sum in a custom state for the Repeating Group?
I have yet to find a way. But I don’t mind storing in Bubble’s database as long as it’s not too complicated. From your original recommendation, it looks like I would need to create a bunch of fields equal the the number of cells available in the Repeating Group? If so, that won’t work because the data is dynamic. Some days will have more data, some will have less.