Problem with bot execution time and recursion, help!

Hello community

If you could help me, I have been dealing with this problem for a long time.

I have a table A like the following:

MarcelaVega_0-1653495584824.png

And I must open this data to a form like the following table ๐Ÿ˜ง

MarcelaVega_1-1653496399755.png

I made a UX where the user chooses a period and when saving a bot is executed, which in turn executes other bots in a chain:

1) BOT 1 (table A)
a) copy table A (by period and user) to table B for week 1
(via recursive action group)
b) copy table A (by period and user) to table B for week 2
(via recursive action group)
c) copy table A (by period and user) to table B for week 3
(via recursive action group)
d) copy table A (by period and user) to table B for week 4
(via recursive action group)
e) copy table A (by period and user) to table B for week 5
(via recursive action group)

this BOT 1 triggers BOT 2

2) BOT 2 (table B)
a) copy table B (by period and user) to table C by date (quantity)
(via recursive action group)

this BOT 2 triggers BOT 3

3) BOT 2 (table C)
a) copy table C (by period and user) to table D by AP
(via recursive action group)

When I try with little data, for example about 6 records, it takes a while, but it works, all the bots are executed and the tables are loaded one by one.
But when I try with about 10 records (which will actually be like 40 or more), when I run, after 5 minutes or so, the bot restarts, and the data starts to load again!

Does anyone know if there is a way to correct this?

Bot 1 performs such simple actions, for example in oracle or sqlserver, a select UNION, and load another table, but
I don't know how to do it in APPSHEET.

Please help!

Greetings from Chile.

 

 

 

 

0 5 216
5 REPLIES 5

Hola Marcela, 

Surely there is a better way than running that many bots and recursive actions. Let's put aside what you have for a moment; tell us instead what you want to do, why are you copying data repeatedly to other tables? what is the purpose? Thanks.

Hi Josรฉ, thank you for answering.

I will try to explain myself better.

I have a table that enter the role "Boss" that has the following structure:

MarcelaVega_0-1653520765697.png

Here a "Boss" schedules the activities of the month for his employees by weeks, for example, in the above image, he is scheduling that activity 1 in May/2022, should be performed 1 time in week 1, in week 2 and in week 3 by employees AP2 and AP3. As well as that activity 2 should be performed 2 times in week 4 of May/2022 by employees AP1 and AP4.

So far, so good, but this information needs to be broken down for each particular employee, as each employee will access the application individually and complete on one screen each activity they have been tasked with the date and other information

My final table for this purpose looks like this:

MarcelaVega_1-1653521702804.png

MarcelaVega_2-1653522286254.png

That is why I used so many recursive cycles to get from the first table (CHIEF) to the final table (EMPLOYEES).

- cycle to load week 1
- load cycle week 2
- load cycle week 3
- load cycle week 4
- load cycle week 5
- cycle to load records when there is more than one activity per week
- cycle to load records per employee

I wish you could help me to simplify my process.

I just grazed over your last reply - and I don't want to hijack the thread.

But can you not achieve this with less tables (more columns) and use slices?

For most of my solutions, I run a single database with multiple layers of access from accounting, sales, allocations, workers, etc.

The UX, Views, Actions, everything is all set by the user "group" per say.

Initially, I had the scheduling in it's own table, however, even the scheduling is in the main/child table in it's very own set of columns, which is much more straight forward.

Hi Ryan

Thanks for the interest.
If you notice, I need to convert information from columns in the first table to rows in another table.
So I need a process that allows me to do this, and I solved it with recursive bots, but it takes a long time, with few records and finally it is not useful in practice.
I need an idea to convert columns to rows!!!!
Someone knows how to create a button that executes a bot????
Because it occurs to me to divide the initial bot that I have in parts, but the screen only executes from the SAVE all at once, and I would like to call the bot.... in parts.

 

The way I'd approach this requirement would be different and wouldn't involve any bots. What we are going to do is to preserve the Boss's table as is, he's the boss after all, and would even make it the basis of how the employees would work. 

The general idea would be this:

  1. The employees will have a view similar to the first view created by the boss.
  2. Each employee will see only the information relevant to him. 
  3. The employee could see only the current period.
  4. The counts under the week numbers will be dynamic and they would display the number of activities that an employee still needs to perform. For example if the boss assigns a number 3 for an activity in a certain period, at the start of the period this is the number an assigned employee would see. When he completes the activity once, this number will drop to 2 and so on.
  5. Action buttons attached to these columns would enable the employee to go directly to the form where he'd complete that specific activity.

In this way, no bots would be needed.

Top Labels in this Space