Looping Action

I need to perform iterate / loop records and select records based that match specific logic / condition. Please implement an appropriate action / function.

Already exists:

1 Like

(See the second option)

1 Like

I want to add 200 new records in one go.
How I can do so without some while() or loo() function?

Please, share some working app

Is this possible? What if I had a 400 row table, and 20 of them had the same column A value, and 40 of the next rows had the same column value. Is it possible to submit a form with an enumeration of the column A values, and then add the first 20 rows to the end of the table, but being able to change the column A value and column B value when added to the end of the table?

1 Like

Hi Steve,
Is there any issue / disagreement upon implementation of while() , Loop function and add n number of rows to a table ?
Even FileMaker Pro (Joint Low Code Leader from Apple) took years to listen and implement While function. It simplifies some of the tasks in an incredible manner. FileMaker Pro provides Loop script step as well.

Hey @Riazsg, could you elaborate on a scenario that you would need a WHILE() function for? I’ve been wracking my brain trying to come up with a scenario, but everything I come up with already fits into the actions available.

Perhaps it’s just a matter of finding the right technique for accomplishing what you want to do.

1 Like

I suggested this new feature some time ago. Consider adding your vote and comments there please:

Hi
Let us begin with a simple scenario.

  1. I have a Google Sheet “Customers” with no data.
  2. I created a new app in appsheet “Customers”
  3. Added a new table “Customers” with only column names without any data.
  4. Now I want to create an action to add a variable number of records with prefilled data to the Customers table. I have many customers. So each customer will have different number of records to be added. I want to be able to pass the number of records to be created as a parameter to the action. Otherwise I will be create multiple action which is really unnecessary and cumbersome.

I will appreciate your help



1 Like

Hello @Riazsg;

In order to accomplish this, you first need to have the information about how many customer records to create for each customer ALREADY present in the app.

I see the confusion and difficulty with your scenario.

You might be better served by looking into the Import CSV feature - this would allow you to pre-formulate certain parts of your table, and use formulas for the rest, to automaticaly populate your customers table with records.


If you wanted to create a way to create customer records inside the app, like I said before you need a list of records that need to be created ALREADY present in the app.

Imagine if you will:

  • you have a table that contains a list of customer names/emails/phone numbers to be added to the customer table.

(Would this NOT be your customer table already???)

If you wanted to use this list as the bases for creating customer records, you would first need to add that first table to the app - this way the data about what needs to be created is present and in the system.

You can’t expect a data system to create data when you’re not telling it what to create.

  • From here, you’d use that list in your action (creating records in another table using values from the table) as the basis for what records to create.
  • To ensure you don’t get duplicates, you’ll need to put a condition on the action (taking your reference list of customers and subtracting the created list of customers - giving you the difference in records that need to be created; if the difference is NOT blank, then the action will run).
1 Like


@retailpartnercom what are you asking here… I feel like there’s a good answer just around the corner, I just can’t quite put my finger on what you’re asking. :nerd_face:

1 Like

Can I specify the number of records to be created as a dynamic parameter and not as a static value that needs to changed manually each time?

Of course, instead of using a number use a formula to derive that number. That’s what I meant by:

But in order for that to work, you need to have the data present inside the app to tell it how many need to be created, how many are already created, etc.

1 Like