Add an arbitrary number of rows to a table based on a column value of type Number.
For this example, the table from which the row-addition process will be initiated is called Control Table. The table to which new rows will be added is called Target Table. Use your own names as you see fit. Note that they could even be the same table. Control Table must allow updates; Target Table must allow adds.
Control Table must have at least two columns for this process: Finish Count (type Number; the number of rows needed; may be virtual); and Add Count (type Number; the number of the next row to add; may not be virtual). Column names may be changed as desired.
Finish Count should have Required? set to ON. Add Count should be blank or zero.
This is the action that you should invoke to add the rows: it does everything.
OR(ISBLANK([Add Count]), ([Add Count] < [Finish Count]))
This manages the Add Count column value, which contains the number of the next row to add. Itโll start at 1 and increment to Finish Count.
([Add Count] + 1)
TRUE
(or blank)This action adds one row to the Target Table table for the current value of the Control Table rowโs Add Count column.
TRUE
(or blank)This action implements a loop by recursively performing action (1) for each successive number in the indicated range, from 1 to Finish Count.
LIST([_THISROW])
TRUE
(or blank)Return to action (1) and add actions (2), (3), and (4) to its Actions list.
Very interesting, Iโll try I was looking for something like this, it would be great if there is a way to update if number already exist.
Thanks for this tip. I was looking for something like this, to add rows, for a monthly budget (I have to create/add the next 12 months, one month per rowโฆ). This does the job.
As a newby, some problems are not intuitive. Could be nice if appsheet add an action to mimic โfor each/do while/repeat until/โ to do this more easily.
This seems like a much simpler approach than this:
Is it the same result or am I missing something?
IN my case [Finish Count] is a VC that counts the elements on a list type column,
What if I want each of the new rows to have one of the different elements of that list? Is that possible?
i.e.
[Example] (List type column): A, B, C, D, E
[Finish count]=5
New rows:
@Nicolas_Feldman
Try this:
Is there any sample app using this set of actions? I would like to see an app using them in order to understand better how it works.
Thanks in advance
Like the one linked as the second line of the post?
I have been using this for a while and its working perfect. As i have bulk rows to add each time instead of attaching this with an ACTION i have done it using WORKFLOW.
Does this effect looping action once its completely migrated to BOTS ?
I have scenarios where three looping actions are executed at the same time into 3 different tables on adding a row in parent table. I have created 3 different workflows for that. Will this migration to BOTS effect what we have right now ?
Sadly, the answer should be โwho knowsโโฆ
I just hopeing the existing Workflow could be transformed automatically onto BOT without any problems with us.
If itโs like that. I might have to stop all my applications and find a new way to achieve the same.
As far as you are able to achieve your goal with Action only, like looping actions, there should be no necessity to involve Automation.
I am not able to achieve it using actions because i have 3 tables to updated in parallel. If i attach the action on save it actually worked for one table or one set of looping action. I have multiple sets of looping actions.
I m not sure what your exact requiremet will be, but should be achieve with action only. But set ups is surely complex though.
Itโs very simple. Here is an example.
I think this is a good news Editor improvements to Automation
Thanks Steve
Everything works fine if I activate the action with saving the view.
I ask the community for HELP
For another application I have to activate the action whit an automation (or other suggestion)
as I modify the data whit a dynamic email and detail view and Quick edit columns
(this view does not allow me to save on Event Actions --- Actions to take when events occur.Form Saved).
I've tried them all but I can't activate the action correctly
RESOLVED
RISOLTO
I DIDN'T REALIZE THAT I HAD A VALID IF PROBLEM WHICH GIVED ME AN ERROR
THANK'S
Thank You @Steve
hi @Steve ,
I've tried this method to create multiple rows for the same table (control table = target table), but it seems that it wont trigger after every row addition, i've tried to trigger using automation, but it's shown error in the monitor. Kindly help