HI! I have some questions on updating rows from a screen. The gist is I'd like to build an Edit & Save feature.
As an example, I have a very simple "Customer Details" table, which is displayed on a "Customer Details" screen.
When people navigate into this screen, the details cannot be edited. Upon clicking the "Edit" button, all the details become editable.
(I made the fields editable by (1) Creating an "$Editing" boolean variable, triggered by the Edit button (2) And creating two copies of each of the data cells, one version is editable and one version is read-only. Each version's visibility is tied to the $Editing variable. So when the Edit button is clicked, the read-only version disappears and the editable version appears. Got the idea from another discussion!).
The problem I have is:
(1) When the fields are editable, the edits are being made live to the underlying row. Due to various reasons, I don't want the changes to be made live. Instead, I want the edits to only update upon clicking a "Save" button. Is there a way to disable the live editing? Or must I create an automation instead with a separate save button? What's the best way to do this?
(2) After the "edit" button is clicked, I'd like the text on that button to change to "Save" - (2a) is there a way to use a variable as the text on a button? (2b) can I then create automations for that button, conditional on what the word is on the button? (e.g. When the button reads "Edit", clicking leads to an automation for editing the cells. When the button reads "Save", clicking leads to an automation to update the rows.)
Thank you!