top of page
Writer's pictureJon Russell

Filter Array FTW

Trigger Conditions - oooooooh I love them !


The benefits of them are that, your flow will only trigger when that condition is met, so you don't end up using unwanted service calls. For example, you might use the "When an item is created" SharePoint action and you might want to restrict the flow running on the condition of what composes that item.


Here we have a list of my blog posts inside a SharePoint list:




I have added a column called Randomly Post, and I want to ensure that when the value for this is true or yes, then I want to copy the record from this list to my "To publish" SharePoint list. I can then do what I want with that list later.


For now though, I only want this flow to trigger when this Randomly Post field is true.


In steps the Filter Array action. We can use this to set up a condition, and then copy the advanced mode and paste this into the trigger condition.




Above, I have added the filter array step, and chosen the "Randomly Post" column and check to see if it is equal to true. I then can click on Edit in advanced mode and I am then able to copy the advanced mode low-code line:


i.e. @equals(triggerOutputs()?['body/RandomlyPost'], true)

Then, I can go and paste that in the trigger conditions of the trigger step. To do this click on the ellipses and choose :



Click on add underneath Trigger Conditions, and paste the low-code line above and put this in the field available:


Click done, and you are good to go.


As always my inbox is open for any questions, or feel free to leave a comment below/


jon@jondoesflow.com

456 views3 comments

Recent Posts

See All

First

3 Comments


Rik de Koning
Rik de Koning
Jul 11, 2022

Nice one! I always use Do until for this. Works exactly the same way (GUI builder > Edit in advanced mode) so either way is good 😊

Like

Expiscornovus
Expiscornovus
Jul 11, 2022

Hi Jon,


Great article, using a Filter Array to get the correct syntax is very useful. Btw, in this specific example you can actually simplify the expression. You can remove equals, because the output of the field is a boolean. @triggerOutputs()?['body/RandomlyPost'] should also work :)

Like
Jon Russell
Jon Russell
Jul 11, 2022
Replying to

Thanks a lot !!

Like
bottom of page