Grouped Action To Multiple Tables

Business transactions are first recorded in the journal and then they are posted to respective ledger accounts in the general ledger. This requires the use of two tables and the simultaneous recording of the transaction in two different tables.

I my case in particular, which is an inventory app, I need and action to deduce a quantity to the inventory, then I need to register this action on a Journal Table, then I need to add this product to the shipping table which contains multiple items for shipping.

A Grouped Action would solve this problem as follows:
Action 1: Deduct from Inventory = (on hand) - (shipping qty)
Action 2: Record this transaction on the journal: LINKTOFORM(JOURNAL_FORM,ETC,ETC)
Action 3: Record this transaction on the shipping Table: LINKTOFORM(SHIPPING_FORM,ETC,ETC)
Action 4: etc etc

Unfortunately only one LINKTOFORM() action can be executed. Action 3 is never reached.

To do this I need another separate action, which seems wasteful and adds more clutter to the app.

Solved Solved
0 6 1,137
1 ACCEPTED SOLUTION

After much digging around I finally got it to work. Why is this stuff not clearly spelled out somewhere?

You are correct about the ability to trigger the next action, this can be done from the previous action once it is completed.

How can this be accomplished?

The end of the previous action is when the form is saved by the user.

Where can this form be found?

This form is not automatically shown, it is hidden in the UX interface and you have to click on the โ€œShow system viewsโ€ near the bottom of the page.

Once this opens you will see the form view specific to the current table, this form is automatically generated and is responsible for the interface and fields that need to be completed before the save button is applied by the user.

In this form under the Behavior section can be found the Event Action โ€œForm Savedโ€ and next to it is the drop down menu where the next action can be found. As you said before this action has to be pre-configured in the Main Behavior Section for the current table.

So yes, thanks for the help. Now I can cascade these actions as needed,
but it would be much easier if the LINKTOFORM() could be used directly on the beginning table.

Andโ€ฆ yes you gave the solution but for the sake of clarity I have marked my post as the solution. Hope that is ok with you.

View solution in original post

6 REPLIES 6

You need to split up your action stack (I call the grouped actions โ€œStacksโ€ because in the editorโ€ฆ itโ€™sโ€ฆ a stack of actions. ).

In the event action for the form in action 2 (Journal_Form), put action 3 there; then in Shipping_Formโ€™s even action, insert action 4; etc.

Thanks for your suggestion. I am trying to edit the Behavior like you have suggested but the โ€œEvent Actionsโ€ cannot be changed to Form Saved.
I tried by creating a new View of Form type, this gave me the โ€œForm Savedโ€ event but I have no idea how to insert the new action thereโ€ฆ
The Applink cannot be changed either.
Thanks

You should be able to just select the action from the dropdown. Youโ€™ll have to ensure that the action you want to run is on the same table though.

For example: when Action 2 fires off the form for the JOURNAL table is open; so in order to use any actions youโ€™ll have to create them on the JOURNAL table.

Action 3 opens a form on the SHIPPING table, so any action you want to use in the form save event will need to be on the SHIPPING table.

etc.

Bahbus
New Member

As @MultiTech_Visions shows, you should alter the form saved action for your flow.

Group actions will never be able to support multiple LINKTOs. Forms, especially, because of exactly what is pictured above. Forms must fire actions themselves, which means the group action that gets you there must be terminated.

After much digging around I finally got it to work. Why is this stuff not clearly spelled out somewhere?

You are correct about the ability to trigger the next action, this can be done from the previous action once it is completed.

How can this be accomplished?

The end of the previous action is when the form is saved by the user.

Where can this form be found?

This form is not automatically shown, it is hidden in the UX interface and you have to click on the โ€œShow system viewsโ€ near the bottom of the page.

Once this opens you will see the form view specific to the current table, this form is automatically generated and is responsible for the interface and fields that need to be completed before the save button is applied by the user.

In this form under the Behavior section can be found the Event Action โ€œForm Savedโ€ and next to it is the drop down menu where the next action can be found. As you said before this action has to be pre-configured in the Main Behavior Section for the current table.

So yes, thanks for the help. Now I can cascade these actions as needed,
but it would be much easier if the LINKTOFORM() could be used directly on the beginning table.

Andโ€ฆ yes you gave the solution but for the sake of clarity I have marked my post as the solution. Hope that is ok with you.

There is a lot to spell out, and they do their best. I understand the frustration, we all do; AppSheet has a steep learning curve that weโ€™ve all had to go through.

By all means, yes! Love the detail you gave, anyone trying to solve a similar problem will find this very helpful.

Top Labels in this Space