Event Actions Vs. Workflow

Hi Guys,

I’m trying to make a simple Inventory app.

I have the “Receiving” Table and “Inventory Log” Table.

Like every Inventory app, I would like to:

  1. Add a new row on table “Inventory Log”, if there is a new row on the “Receiving” table.
  2. Update that specific row in “Inventory Log”, if there is an update on the “Receiving” table.
  3. Delete that specific row in “Inventory Log”, if the row on the “Receiving” table is deleted.

I did that mechanism with 3 separate workflows (1 Add only, 1 Update only, and 1 Delete only). Just later this week I realize that number 1 can be done without a workflow, by selecting the Event Actions “Form Saved” to my action.

What am I asking Is, Is there any better way to do the second and third mechanisms? maybe a similar way to Event Actions “Form Saved” but for “Form Edited” and “Form Deleted”

I can think of a way to combine 1 and 2 together with conditional action then group them like if there is no data do number 1 if there is data do number 2 (Haven’t tried it yet). But I cannot think of a way around number 3.

Some thoughts, info, ideas..

For 1 and 2, since the FORM only has SAVE event available, you may have to create two forms.

https://www.googlecloudcommunity.com/gc/AppSheet-Q-A/Different-view-for-add-vs-edit/m-p/331552

has been discussed to identify the state (add or edit) of the form, but your case, I believe, requires to create two separate forms because the subsequent action occurs only after the data has been saved.

As for 3, you may consider isapart of option but there are a few considerations to make and may not fit your use case.

https://help.appsheet.com/en/articles/961426-references-between-tables

Another idea is create an “execute a sequence of actions” action to first delete the related log row and then delete the receiving row.

2 Likes

Hi @TeeSee1 ,

I did a group action with conditional action for 1 and 2 already and it works. But if we put the app’s performance into consideration I think your answers are better in the long run, because the apps only execute a row of actions needed (not checking if the condition is true or not). Please correct me if I’m wrong.

As for 3, yes “is a part of” option is not fit my use case, but executing a sequence of actions is a brilliant idea, can I replace the default delete button with this action? (It seems that I cannot put my “sequential delete” action button in the same place as the default delete button). So that my app is completely free from a workflow for this kind of “add/edit/delete” action.

I am really not too sure about the performance cost. Probably only a slight difference. You can choose whichever approach based on UX in this case.

Yes, you can disable any sys actions by appearance => do not display and replace it with your own action.

1 Like

I already hide my delete sys action, but does not seems to be able to move the new delete button to the same place as the delete sys action. Is there a way to do this?

This has been a requested feature but not available yet AFIK…

1 Like

I see, Thanks a lot @TeeSee1