I have a table that shows a weekly meal plan on a page with an edit button on each row. The edit button opens a popup with a dropdown corresponding to each meal in a single day. If I don’t make any changes to a field, and save it (using the workflow action make changes to a thing), it saves an empty value in the database. It should ideally make changes to only thosew entries that have changed. Looking for some smart way to fix this issue.
In your action, you must’ve added the field with an empty value. Only make changes to a field that you’re changing
I’m positive this is how your action looks like:
Make changes to thing action
field 1 = new value
field 2 = new value
field 3 = empty
field 4 = new value
if you’re only changing the values for field 1, 2, and 4, you must not add field 3.
If you want to change multiple fields in one action, you can add a default data source of the inputs referencing to its value and on your action simply reference to all the corresponding inputs
By this, do you mean that I should set states instead of getting the value from a dropdown directly into the database? Because I have set a default value - on each dropdown.
Thank you for taking the time! I am playing around with auto-binding now (I am not excited about doing this but hey, if it works!)
No, you don’t need to use states. Since you have default values, you can just reference to all inputs/dropdowns so any new and old values would be saved.
Autobinding would also be great since you don’t need to have a workflow to update a thing and you could select the field that you only want to update
I am not quite sure how to do this. Since the default value is set in the properties, shouldn’t the workflow just pick up the default value if it has been left unchanged? Is there some conditional expression that I need to use in the workflow make changes to thing action while assigning the value?
Auto-binding is working fine, but I am just curious why this is not working.
If you add the field in the fields that would be changed in an action and leave the source blank, it would then change the existing value to empty like this example:
basically there are six dropdowns giving the user the option to change all the entries in the generated plan of a single day. This is in a popup that comes up when the row edit icon is clicked. If any of the meals are not changed while the user has changed any 1 or more, they feed into the database as empty values, despite me having provided each drop down with a default value.