Multiple data records

Hi to all,
I’m trying to create an app to organise swab tests, in order to verify swab results and give people access to a certain zone.
I wold create a first record in which I set the arrival date and the departure date, maybe an action could create as many record as I need from 2 days before the arrival and until the departure date. The frequency depends on the activity of this person.
Example:
Activity type 1: 1 swab 4 days before arrival and one swab 3 times a week until departure (not Saturday and not Sunday)
Activity type 2: 1 swab 4 days before arrival and one swab 2 times a week until departure (not Saturday and not Sunday)
Activity type 3: 1 swab 4 days before arrival and one swab 1 times a week until departure (not Saturday and not Sunday)

I’ve tried with an action but I was able only to create an action that create a copy of the record two days after but only once…

Anyone can help me?

This post might provide some ideas:

[FAQ: Add rows for a date range](https://community.appsheet.com/t/faq-add-rows-for-a-date-range/30502) Tips & Tricks ?

Add a set of rows to a table, one row for each date, starting with a given start date and ending with a given finish date. Try the sample app! 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 thre…

Many thanks Steve, this is very helpful but… What is the best way if I want to create a new record only in certain days, for example: I want to create some records from start date to end date but only in Monday, Wednesday, Friday and absolutely not in Saturday and Sunday?
I’ve tried with “workday” but my formula don’t works fine…

Here’s another sample app:
https://www.appsheet.com/samples/Examples-of-loops-using-actions?appGuidString=7b9ae746-1f51-4ecb-8c39-b322e1c12da6

simone_checchin:

What is the best way if I want to create a new record only in certain days, for example: I want to create some records from start date to end date but only in Monday, Wednesday, Friday and absolutely not in Saturday and Sunday?

There’s a lot of logic involved here–I can’t give you a simple answer. You’ll probably need more help than I’m prepared to provide. Perhaps consider engaging an AppSheet partner for help?

Thanks Steve, I have another question:
I’ve tried to recreate the same action of this app, but the actions don’t start automatically when I create the record… If I copy your app it works fine… but not in mine… maybe I’ve lost some steps or settings?

You need to setup some way to prompt the action to fire. In that sample app, the action is attached to the form as the Form Saved event action:

MANY THANKS STEVE.
I’ve solved with some formulas and trick…
but I have another problem now…
I want to update the data in the first table and update all the related records in the second table
example:
in the first table I update the “arrival date” column with the form, in the second table I want to copy the “arrival date” column value for all the related records.
Note that I’ve already create a ref through the first and the second table with the value of “row id” of the first table with “is a part of”, so every related record in the second table has the same “row id” value, when I delete the parental record in the first table all the related records will be delete (this works fine)…
next step is to find a way to update all the related records…