Help

Re: Automation: New Record(s) based on # field

757 0
cancel
Showing results for 
Search instead for 
Did you mean: 
Sean_Lake1
8 - Airtable Astronomer
8 - Airtable Astronomer

Hey all.

I'm looking to automate a task based on # of projects included in a record.

Sean_Lake1_4-1715190493521.png

The above is a listing of test courses.  The are marked for the trigger conditions, and should be the only records that are created into the Project Production Table. 

Sean_Lake1_5-1715190566267.png

I'd had a simple automation that did this perfectly.  However, I'm needing it modified to where it will now create new records based on the # of projects in that field:

Sean_Lake1_6-1715190637234.png

Here's the automation setup:

Sean_Lake1_0-1715190430287.png

Sean_Lake1_1-1715190439695.png

Sean_Lake1_2-1715190449413.png

Sean_Lake1_3-1715190465717.png

I know I need it to loop a # of times based on that Project's field, but I just can't seem to figure it out in AT.

I feel my settings aren't quite there, obviously.  

Also, does the Trigger's conditions affect what records the FIND RECORDS action looks at or is it its own?

 

Thanks!

 

 

 

 

3 Replies 3

I'm not too familiar with scripting stuff but here are my thoughts how how it could possibly run a loop.

Make those Trigger conditions to include:

AND when "# of Projects/assets included" > "0"

Add a step that decrements the "# of Projects/assets included" field by 1.
Not sure how to do this, you might need a script.

Hopefully, that will re-trigger the automation until the number hits 0


Justin Ng
Programme Coordinator at Sistema Aotearoa
https://www.sistemaaotearoa.org.nz/

@Dan_Montoyacreated a pretty elegant solution for this and it boils down to:
1. In the table where you're creating the records, create a number field called "Current #"
2. In the table where you're creating the records, create a formula field called "Next #" where the formula is "{Current #} + 1"
3. In the table where you're creating the records, create a number field called "Desired #"
4. In the table where you're creating the records, create a formula field called "Create another" or something that checks whether "Current #" is equals to "Desired #"

For your initial create record automation, put the "Current #" value as "1", and put the "Desired #" value as "# of Projects/assets included?"

Create a new automation that will trigger whenever a record in the table where you're creating the records has a "Create another" value of "Yes" or some such, and its action would be to put the "Current #" value as the "Next #" value, and put the "Desired #" value into the "Desired #" field, does that make sense? 

I've probably butchered the explanation somewhat, and I would link you to the original thread but I've lost it, sorry!


Dan_Montoya
Community Manager
Community Manager

Thanks @TheTimeSavingCo , that was the base that creates more books for authors.