May 08, 2024 10:53 AM
Hey all.
I'm looking to automate a task based on # of projects included in a record.
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.
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:
Here's the automation setup:
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!
May 08, 2024 03:49 PM
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
May 09, 2024 08:25 PM
@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!
May 10, 2024 08:05 AM