Hi all.
I have a use case where I am in a view form of a single row of my data. I have an action button that when clicked, I want to open a new form for a user, pulling through a selection of fields they can edit.
So, I added a new form (Request Support) that has the selection of fields to edit
I added the button to the top of the original view screen for data table โNew Legal Obligationsโ, with action โgo to another view within this appโ with target
LINKTOFORM(โRequest Supportโ, โNew Legal Obligationsโ, [NLO Ref # (View)], โNew Legal obligationsโ, [NLO Ref # (View)])
I can pull up the new form OK, but when saving it adds a new row of data. My intent is to edit the 2 fields already saved for that row. Is my error in the linktoform expression?
LINKTOFORM() can ONLY be used to add a row; it cannot be used to modify an existing row. To open a form view on an existing row, use LINKTOROW(). Unfortunately, though, LINKTOROW() cannot be used to set column values with the opened form.
If you want to be adventurous, you can use LINKTOFORM() to re-add the row: essentially, add a new row with the same key column value as the existing row, overwriting the existing one. You MUST explicitly set ALL of the existing rowโs column values in the new row to avoid data loss; AppSheet will NOT convey data from the existing row to this new one automatically. There are other risks in more complex apps. This is an advanced technique to be used only with lots of caution and testing!
See also:
Thank you, @Steve
My skills (may have?) improved since starting so weโll see how it goes
Is this the only way to open a form with the info from the existing row auto populated and update that row?
You can also use an action of type App: copy this row and edit the copy.
User | Count |
---|---|
32 | |
31 | |
30 | |
18 | |
17 |