Action, according to the value of a line

Hello, can you help me?

How can I repeat an Action, according to the value of a line?

For example, I have a line with the name "Repetitions", when activating the action, I want it to be repeated according to the value of the "Repetitions" line

Solved Solved
0 2 107
1 ACCEPTED SOLUTION

Can you describe what you are trying to do?  Maybe there is a better way using Appsheet built in features.

What you are explicitly asking requires a "looping" construct which AppSheet does not DIRECTLY provide.  However, there are ways to mimic looping within a set of actions.

The easiest way is if there is small limit to the number of repetitions.  For example, if there will never be more than 5 times, then create an Action Group and add to 5 duplicate actions - i.e. Action 1, Action 2, Action 3, Action 4 and Action 5.  Then on each action add the Behavior condition like [Repetitions] >= 1, [Repetitions] >= 2, [Repetitions] >= 3, [Repetitions] >= 4 or [Repetitions] = 5.

If the number of repetitions can be large then action set gets somewhat complex and hard for some to grasp in the beginning.  I would recommend to refer to these posts for more details to understand the process:

Build Video
https://www.googlecloudcommunity.com/gc/Tips-Tricks/Looping-with-Actions-Sample-App-BUILD-Video/m-p/...

Sample App - scrolling through this post there will be references to other apps/posts
https://www.googlecloudcommunity.com/gc/Tips-Tricks/Looping-with-actions/m-p/223708#M75

I hope this helps!!

View solution in original post

2 REPLIES 2

Can you describe what you are trying to do?  Maybe there is a better way using Appsheet built in features.

What you are explicitly asking requires a "looping" construct which AppSheet does not DIRECTLY provide.  However, there are ways to mimic looping within a set of actions.

The easiest way is if there is small limit to the number of repetitions.  For example, if there will never be more than 5 times, then create an Action Group and add to 5 duplicate actions - i.e. Action 1, Action 2, Action 3, Action 4 and Action 5.  Then on each action add the Behavior condition like [Repetitions] >= 1, [Repetitions] >= 2, [Repetitions] >= 3, [Repetitions] >= 4 or [Repetitions] = 5.

If the number of repetitions can be large then action set gets somewhat complex and hard for some to grasp in the beginning.  I would recommend to refer to these posts for more details to understand the process:

Build Video
https://www.googlecloudcommunity.com/gc/Tips-Tricks/Looping-with-Actions-Sample-App-BUILD-Video/m-p/...

Sample App - scrolling through this post there will be references to other apps/posts
https://www.googlecloudcommunity.com/gc/Tips-Tricks/Looping-with-actions/m-p/223708#M75

I hope this helps!!

Muito Obrigado.

Top Labels in this Space