Is it possible to repeat a button's action?

I would like to click on a button that keeps adding rows until the table has 20 Rows for example.

Use Case:

image

I have a button that has a badge that displays how many days don’t have their own rows.
I would like that button to add the remaining number of rows (7) so that there is a row for each day up to Today().

Therefore this button should run the AddRow() action until there are no more days/rows left to add.

Hi ! I’m not on computer now but the solution to yo ur problem is the combination of ForEach and RunAction function.

Use for each to your table filtered with row that don’t have data, and execute action each time.

I’ll tried to make you an example if I find a computer this week end !

2 Likes

I don’t thing this is the solution to my problem.

I might have missed out some important information in my Use Case, but let’s try on this example here:

This button currently adds only 1 new row.
How do I make him repeat himself up until there are 20 rows in the table, and then make him stop so that it doesn’t go beyond 20?

I suppose this should function a lot like an automation rule:
When: Button is clicked
under Condition: The table has less than 20 rows
Action: Add new row

No, as I said you have to use ForEach function.
The first argument of this function will be the range of action. In your case you can with Sequence() function to get from 1 to 20. But the if won’t make several action, for that as U said you walk to use ForEach and eventually run action

If nobody gives you an answer in detail, I will as soon as I get a computer access

But I’m sure there are plenty of example in the forum about that

1 Like

I actually thought this would be impossible, now I’m glad I asked the question, Thank you for the answer!

Here’s what I got:
vivaldi_SaMDvAY6YE

Here you go to create 20 rows in your TestTable :slight_smile:


CPT2210151511-985x490

In your example with the badge « 7 », you can get this value and use this dynamic value instead of the « 20 » in example

1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.