Can't Edit a List of things


i’m trying to create a recipe app and i want my user to edit their recipe

on the Edit page im using an RG to show the list of my ingredients

in my DataTypes my Ingredients is set to List of Text, the Price is set to List of Numbers and Qty is set to List of Text.

the ingredients, price and qty will be saved on my database like this

on my Edit page i call them as a Repeating Group

so when i edit a recipe it will be look like this

the problem is when i hit the save button then hit the Edit button again to view if it was changed then Yes the changes has been made, now the problem is it didn’t save on my database and when i hit refresh it will back again to what it was before

here’s my workflow

can you guys tell me what i did wrong?

Thank you in advance


follow up on this one…

I think I see the issue. I believe a RG’s list of x is is always what was originally retrieved from the database - i.e. the original data source of the RG. So when you ask it to set list to RG’s list of ingredients’ x, you’re just resetting to what it was before.

What I would do (and of course there may be a better way) is to have three custom states on the RG for ingredients, price, qty - all lists. I would then set or add to the custom state lists as edits are made. Then on update I would set the database lists to the custom state lists.

1 Like

This topic was automatically closed after 70 days. New replies are no longer allowed.