Revert or Overwrite Column on Form Cancel? LINKTOFORM vs LINKTFORM

I need to figure out how to trigger an action when a form is cancelled.

Situation:

  1. An action button from a detail view launches a form view.
  2. Before it goes to the view it blanks out the Bin ID field so the QR reader pops up automatically.
  3. But if I cancel the form it should go back to the original Bin ID.

AFAIK, LINKTOROW() is the correct function for this but it does not allow you to pre-fill fields.

Therefor I am using a grouped action 

generativegeorg_1-1689855251826.png

 

 Ignore the "Log Put In Stock" function

1. Sets the values of columns in the row

generativegeorg_0-1689855156425.png

2. LINKTOROW() to my form. (the form is a special view that only shows certain columns. Input is not stable enough for my purposes, still beta)

 

 

generativegeorg_4-1689855296767.png

 

When I hit cancel in the form it returns to the detail view but the Bin_ID is blank.

Can I create a third action that puts it back in (from my log history) if the form is canceled?

Is there another solution besides INPUT()?

 

 

Solved Solved
0 6 324
1 ACCEPTED SOLUTION

1. I ended up creating a "buffer" table, that has columns matching just like the "real" table
(another way to do this would be to create a new temporary row in the existing table or have hidden columns in the table like @Joseph_Seddik suggested , depends on use case ig)

2. An action from the real table detail view triggers a LINKTOFORM() that creates a new entry in the buffer table with a view for the appropriate fields. 
3. The form advances automatically as the user enters info.

4. On cancel nothing happens, just goes back to the original detail page.
On save, it triggers a reference action to a group action on "real" row.

generativegeorg_1-1689964061773.png

5. The grouped action
- copies the fields from the "buffer" into the "real" row

- logs that the action tool place in a log

- deletes the buffer row

- sends you back to the original detail page

generativegeorg_2-1689964199574.png

 

 

 

 

View solution in original post

6 REPLIES 6

The column is "blanked out" because you explicitly set its value to an empty string in the first action. When you launched the second action, the column was already empty. The form did not change anything when you cancelled it. 

Yep. The reason I blanked it is so the QR reader pops up automatically.
If I were using INPUT() or LINKTOFORM() I could remove the Bin ID non-destructively.
Unfortunately INPUT() is unstable and LINKTOFORM appears to only be for creating new rows, not editing existing rows.

The only solutions I can think of are to
1. Have an automation that looks for a boolean and has a timeout to revert to the last Bin ID but that's a terrible solution.
2. Have the form be for a different table, use LINKTOFORM() instead to copy the relevant fields. If it gets saved it copies the info over to the row from the table I intended and deletes the form entry from the "buffer" table. Otherwise nothing happens bc it the entry was canceled.

I'd not edit the same column. I'd conserve the original column and blank/edit a new one. Based on the value of this new column, a bot for example can update the original column with the new value or leave it if the new value is blank.

There's no way to run an action on a form cancel event.

Gotcha, thanks.

1. I ended up creating a "buffer" table, that has columns matching just like the "real" table
(another way to do this would be to create a new temporary row in the existing table or have hidden columns in the table like @Joseph_Seddik suggested , depends on use case ig)

2. An action from the real table detail view triggers a LINKTOFORM() that creates a new entry in the buffer table with a view for the appropriate fields. 
3. The form advances automatically as the user enters info.

4. On cancel nothing happens, just goes back to the original detail page.
On save, it triggers a reference action to a group action on "real" row.

generativegeorg_1-1689964061773.png

5. The grouped action
- copies the fields from the "buffer" into the "real" row

- logs that the action tool place in a log

- deletes the buffer row

- sends you back to the original detail page

generativegeorg_2-1689964199574.png

 

 

 

 

Top Labels in this Space