How to run one workflow and process a large array of strings with several actions per line?

Hi
I can’t solve one problem.
Multiple actions are required to make repeated updates to a large number of rows based on virtual column calculations of those rows.
I try to do this in one workflow, it returns an error: too long calculations.
How to make a line-by-line workflow, so that all calculations work in the background, and not in the user interface, and without large amounts of calculations at once, so that an error does not occur?
The general task is for the user to start the process and the system does everything in the background.
It is required to process several thousand lines in one such background process.

Solved Solved
0 17 700
1 ACCEPTED SOLUTION

Hello everyone again!
I come back here and want to share information on how I made a looped workflow without going beyond the standard Appsheet functionality (without using external services and GAS scripts).

Let’s start again with the task that I set for myself:
It is necessary to create logic for triggering a large (more than 10 actions) set of actions for a large number of lines (the number of lines can also be large, it works for me on hundreds of lines).
Actions for each row are based on computed virtual columns, i.e. I need to apply the action logic several times so that the desired values ​​in the calculated virtual columns bring me the desired result in the standard columns.
All this should work in the background for the user, on a “plug and forget” principle.

And so, let’s move on to the details of the logic that I was able to create in Appsheet.

All logic consists of three workflows:

  1. Workflow # 1
    Contains one action and two webhooks.
    1.1. Action # 1 starts resetting the trigger again of the first workflow.
    1.2. Webhook # 1 (Edit row) is a task for making changes to the selection of rows (with this webhook I create an array of data for the subsequent looped mode of processing rows in the target table).
    1.3. Webhook # 2 (Action) - this webhook launches an action that activates Workflow # 2 for the initial row (from which a link was created with a large number of rows in the target table using Webhook # 1).

  2. Workflow # 2
    Contains a set of sequences of two actions and three webhooks.
    2.1. Action # 1 starts resetting the trigger again for the second workflow.
    2.2. Action # 2 launches a group of actions for a part (I have 20 rows) of the initial selection of rows in the target table (An important point so that the system does not give errors associated with too long data calculation time for all rows, I set the selection limit to 20 rows).
    2.3. Webhook # 1 (Action) - this webhook launches the Target Workflow for my task (the main task of all this logic is to update the text meta fields on the site, 1 line = 1 page on the site). Those. sets of meta fields for twenty pages are sent to the site in a row.
    You can replace this step with your own action for a group of rows in the target table.
    2.4. Webhook # 2 (Action) - This webhook modifies the rowset and ticks “done” for each of the 20 sample rows.
    2.5. Webhook # 3 (Action) - This webhook launches an action that activates Workflow # 3 for the initial row (from which a link was created with a large number of rows in the target table using Webhook # 1 from Workflow # 1).

  3. Workflow # 3
    Contains a set of a sequence of two actions and three webhooks (this is a copy of Workflow # 2, but with a different latest webhook).
    3.1. Action # 1 starts resetting the trigger again for the third workflow.
    3.2. Action # 2 launches a group of actions for a part (I have 20 rows) of the initial selection of rows in the target table (An important point so that the system does not give errors associated with too long data calculation time for all rows, I set the selection limit to 20 rows).
    3.3. Webhook # 1 (Action) - this webhook launches the Target Workflow for my task (the main task of all this logic is to update the text meta fields on the site, 1 line = 1 page on the site). Those. sets of meta fields for twenty pages are sent to the site in a row.
    You can replace this step with your own action for a group of rows in the target table.
    3.4. Webhook # 2 (Action) - This webhook modifies the rowset and ticks “done” for each of the 20 sample rows.
    3.5. Webhook # 3 (Action) - this webhook launches an action that activates Workflow # 2 for the initial row (from which a link was created with a large number of rows in the target table using Webhook # 1 from Workflow # 1).

And it all works in a loop in the background).

View solution in original post

17 REPLIES 17

Split the workflow into multiple workflows that each only process a smaller set of rows. Use TOP(…) to break up the list of rows. For example, if you have 300 records and want to split it into sets of 100, make 3 workflows with this model:

  • TOP(… , 100 )
  • TOP( TOP(… , 100 ) , 100)
  • TOP( TOP(… , 200 ) , 100)

Thanks, I’ll try that method. I will write the result here a little later.

And how can I loop such a workflow so that the number of lines is not limited (in theory, of course).
I understand that this carries risks for appsheet, but still, how to make a looping background workflow, for example, with a step of 10-20 lines at a time?

I need something like a looped set of actions, only in the background and based on the workflow.
Maybe someone faced such a task?
What recommendations can the appsheet team members provide?
Am I going in the wrong direction?
I ask for advice or help)?

You may want to check this Tips&Tricks post by @Steve

Thank you for your attention to my task.
Yes, I am very familiar with action loops and already use them, but the examples that Steve did in the main are about action loops, and I need workflow loops.
As I understand the task, the whole problem is that after performing a workflow on a limited set of rows, start a check for compliance with the conditions for updating the next set of rows and apply this wave again to them.
I still haven’t found a solution (.

Steve
Platinum 4
Platinum 4

Please post a screenshot of this.



First, I backed off to launch a background workflow, which contained a set of actions.
In the screenshots above, this is the second attempt to trigger a workflow by requesting an action via a webhook using the API.
On a small number of lines (I took 18 lines for example) everything works fine, but on 119 lines (this is an example in the screenshots) everything broke (.

In my opinion, you first need to set one background workflow status (make changes to the data) for all the required lines, and then I want to start a sequential execution of the same workflow, which will execute actions in the background in batches.

Steve, could you see the errors and assignments?

I plan to select not through an EnumList with Ref, but through the conditions for matching lines to certain parameters, so the number of lines for batch processing by actions will always be different and the user does not influence this, except by setting filtering parameters for the subsequent selection of these lines and applying workflow to them on background.

Sounds like you may want to consider writing a Google Apps Script to handle these data change calculations. Levent has a great intro guide in the Tips & Tricks section that you can search for.

Thank you, I will draw your attention to this, although I am not a programmer.

Hello everyone again!
I come back here and want to share information on how I made a looped workflow without going beyond the standard Appsheet functionality (without using external services and GAS scripts).

Let’s start again with the task that I set for myself:
It is necessary to create logic for triggering a large (more than 10 actions) set of actions for a large number of lines (the number of lines can also be large, it works for me on hundreds of lines).
Actions for each row are based on computed virtual columns, i.e. I need to apply the action logic several times so that the desired values ​​in the calculated virtual columns bring me the desired result in the standard columns.
All this should work in the background for the user, on a “plug and forget” principle.

And so, let’s move on to the details of the logic that I was able to create in Appsheet.

All logic consists of three workflows:

  1. Workflow # 1
    Contains one action and two webhooks.
    1.1. Action # 1 starts resetting the trigger again of the first workflow.
    1.2. Webhook # 1 (Edit row) is a task for making changes to the selection of rows (with this webhook I create an array of data for the subsequent looped mode of processing rows in the target table).
    1.3. Webhook # 2 (Action) - this webhook launches an action that activates Workflow # 2 for the initial row (from which a link was created with a large number of rows in the target table using Webhook # 1).

  2. Workflow # 2
    Contains a set of sequences of two actions and three webhooks.
    2.1. Action # 1 starts resetting the trigger again for the second workflow.
    2.2. Action # 2 launches a group of actions for a part (I have 20 rows) of the initial selection of rows in the target table (An important point so that the system does not give errors associated with too long data calculation time for all rows, I set the selection limit to 20 rows).
    2.3. Webhook # 1 (Action) - this webhook launches the Target Workflow for my task (the main task of all this logic is to update the text meta fields on the site, 1 line = 1 page on the site). Those. sets of meta fields for twenty pages are sent to the site in a row.
    You can replace this step with your own action for a group of rows in the target table.
    2.4. Webhook # 2 (Action) - This webhook modifies the rowset and ticks “done” for each of the 20 sample rows.
    2.5. Webhook # 3 (Action) - This webhook launches an action that activates Workflow # 3 for the initial row (from which a link was created with a large number of rows in the target table using Webhook # 1 from Workflow # 1).

  3. Workflow # 3
    Contains a set of a sequence of two actions and three webhooks (this is a copy of Workflow # 2, but with a different latest webhook).
    3.1. Action # 1 starts resetting the trigger again for the third workflow.
    3.2. Action # 2 launches a group of actions for a part (I have 20 rows) of the initial selection of rows in the target table (An important point so that the system does not give errors associated with too long data calculation time for all rows, I set the selection limit to 20 rows).
    3.3. Webhook # 1 (Action) - this webhook launches the Target Workflow for my task (the main task of all this logic is to update the text meta fields on the site, 1 line = 1 page on the site). Those. sets of meta fields for twenty pages are sent to the site in a row.
    You can replace this step with your own action for a group of rows in the target table.
    3.4. Webhook # 2 (Action) - This webhook modifies the rowset and ticks “done” for each of the 20 sample rows.
    3.5. Webhook # 3 (Action) - this webhook launches an action that activates Workflow # 2 for the initial row (from which a link was created with a large number of rows in the target table using Webhook # 1 from Workflow # 1).

And it all works in a loop in the background).

That sounds awesome, nice work!

and happy cake day!
3X_b_b_bbaebf2db1d7028cee8ffeb91bc3ed4d30f83f7e.png

Request for further expanding the functionality of Appsheet.
Creation of looped rather complex (customizable) workflows.
Perhaps you will have something like this in Automation.

Top Labels in this Space