Opening a form with subset of row

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?

0 4 619
  • UX
4 REPLIES 4

Steve
Platinum 4
Platinum 4

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.

Top Labels in this Space