On a form layout, the user enters information listing their favourite fruit one at a time. These are saved as separate things.
Then the user is prompted to make a dish using some of the fruit they specified above. He selects these ingredients via a multi select option. The user adds the ingredients to his dish and saves it.
He then later deletes some of his favourite fruit earlier on in the page. This naturally should have an impact on the dishes he has chosen the ingredients for. But, when I open up a dish and view the ingredients, I can still see the deleted fruits present (but naturally cannot add these deleted fruits to any new dishes).
How can I automatically remove any deleted data in those other things that feature said deleted thing. I assume this is happening because the later multi-select tool captures the data that was entered previously, saves it as a new thing in a new table, and nothing updates as its a static data.
I either need to automatically find a way to update those dishes (and remove said deleted fruits), or, work out an expression to notify what was delete and what dishes a now affected - or both.
Yeah I figured that one option would be add a step in the workflow, but I just discovered also that when I make a change to the name of the fruit, all the dishes would not longer show that fruit as part of the dishes it was previously assigned to.
I know why this is happening - when I allocate a fruit to a dish, that information shows within the repeating group and that’s done via real-time searches between the two tables. But what’s saved in the table is now different to the actual data (it doesn’t update dynamically).
So the solution this is to create a bunch of steps in the workflows for the ‘amend’ button for the fruits etc that would update dishes with the new names.
I’m wondering if there is another way to do this, preferably dynamically that updates the table fields directly.