Help

Re: Automation suggestion: conditional stop step

1162 2
cancel
Showing results for 
Search instead for 
Did you mean: 
Francois_Bedard
5 - Automation Enthusiast
5 - Automation Enthusiast

I would like to see added a new condition that would allow an automation to stop at a certain point if conditions are met. Currently, I feel like I need to create a script to do that. Unless there is another method that I don’t see?

6 Replies 6

Hi,

it depends on your previous steps and which part of their output you want to use if script should continue. Usually it’s possible by breaking automation into two parts and additional field (with checkbox, for example). First part “marks” record to change, second - do something with marked. If nothing marked, then second won’t run.

Zachary_George
5 - Automation Enthusiast
5 - Automation Enthusiast

I agree with this suggestion. Currently, I have a weekly recap pushing to Slack, but even if it is empty, it still pushes. Can’t think a work-around at this time, aside from script, which I’m not as versed in.

Francois_Bedard
5 - Automation Enthusiast
5 - Automation Enthusiast

It would actually be even more valuable if we could add CONDITIONS in any step.

If no conditions are setup, then it would simply always execute (and this would be default).

On the other hand, if we needed conditional step to be taken, it would simply translate to something like this:

1- Trigger: Checkbox is checked on table A
2- Step: Find matching records in table B
3- Step: If records found’s length = 0 then Create Record in table B

Personnaly, i’m fluent in Javascript, so I don’t really mind doing it in script, but it’s more time consuming than simply adding steps.

Sorry, i don’t know what is recap.

I use 2 approaches:
Sometimes the task needs a bit more that just no-code automation.
usual script is: take data, process, write.
in automation, you can define input/output with gui, and use simple pieces for processing.
e.g. take some record (single ID) from “find record” result (array of IDs)
image

this ID can be used in next step

In your case, you can pass lenght directly

image

Second, I started learning JS some months ago and I had troubles - to understand and remember all those “arrays of objects of arrays” and wasted much time on update/create at the script end.
So i prepared some templates like this

const table=base.getTable('test1');const fl='Calculation';
const upd=await table.selectRecordsAsync({fields:[fl]}).
then(q=>q.records.map(r=>({'id':r.id,'fields':{[fl]:''}})))
while(upd.length) await table.updateRecordsAsync(upd.splice(0,50))

Yesm that part I understand. My suggestion aimed at a solution (suggestion actually because it doesn’t currently exists) that doesn’t involve scripting. Conditions is a rather common programming part of code and it could be easy to not have to rely on code to do so. (I’m thinking about those who don’t know javascript at all)