Update an element text in a workflow

Hi there, I have a table with select elements in every rows.
When the page loads, the rows get filled with data from my datbase.
The user is able to use the select element which open a modal to validate the new information selected.

My problem is if the user selected a wrong info and the user closes the modal to cancel it.
On the database it won’t change the information selected, but on the user view the selected text stays, which is not so cool! I would like to add in the closing modal workflow a way of putting back the actual infos. I managed to store the old info in a variable when the user select the new option. But i can’t find a way of re-updating the select element text once the workflow of closing modal has been used.

I also thought about re-fetching the data to update the view, but fetching the data doesn’t reupdate the view apparently.

My only idea rn is to window.location.reload();

But i don’t like this solution doesn’t seem viable in the long run…

If you have any ideas !
Thanks

Hi @antoine_caron

When you close the modal, you can use the Reset variable value workflow action. This will reset the variable to the previous state.

Thanks for your answer, well the thing is the select initial value is = item.data.role

But i can’t reset that ?

You can conditionally render the input select with a variable and update this variable twice with the Close button. It works now.

Thanks a lot !

1 Like