1

I have a flow that is supposed to update OR create a record in list B based on if an item is added or updated in List A.

But I want only this to apply to a subfilter of list A, i.e. where a column A in list A = "Yes" then update or create. I am not sure how to build this into my functionally.

Here is my flow:

enter image description here

enter image description here

This is my condition statement: length(outputs('Get_Items')?['body/value'])

2 Answers 2

1

As mentioned by Chris in his answer, best and recommended way to achieve your requirements is to use the "Trigger conditions" in Power automate flow.

You can write flow expressions for this requirement in either of below ways:

1. Single trigger condition:

You can add all conditions in single expression like:

@and(equals(triggerBody()?['ColA'], 1234),equals(triggerBody()?['ColB'], 'Cool'))

enter image description here

2. Multiple trigger conditions:

You can also use +Add option to add multiple trigger conditions and those will be taken as And conditions by default:

@equals(triggerBody()?['ColA'], 1234)

AND

@equals(triggerBody()?['ColB'], 'Cool')

enter image description here

3
  • thanks Ganesh. What if I need something Like @equals(triggerBody()?['ColB'], 'Cool') Or @equals(triggerBody()?['ColC'], 'Really Cool')
    – Jonnyboi
    Dec 20, 2022 at 16:31
  • You can use multiple conditions using single expression as shown in #1 example in above answer. Dec 20, 2022 at 17:38
  • You can ask a new question with more details about your other requirements and I (or other community members) will try to help you. Dec 20, 2022 at 17:39
1

If you are saying you want the flow to run when an item is created/modified in List A but ONLY when Column A in List A = "Yes", then you can do this with a Trigger Condition.

  1. In your trigger action (the first one) use the 3 dots menu in the upper-right and select Settings:

List item

  1. Click the plus beneath Trigger Conditions and add @equals(triggerBody()?['ColumnA'],true) replacing ColumnA with the actual INTERNAL name of the column:

enter image description here

Now the flow will only execute when Column A has a value of Yes. This keeps things simple but also prevents a Flow run happening when you don't need it.

2
  • Somewhat. I am not sure if this works for what I want to do. I want to Create or Update only records where List A Col A = 1234 and List A Col B = 'Cool'. So Only create when these conditions are met, and only update when these are met.
    – Jonnyboi
    Dec 19, 2022 at 22:02
  • I need something thats not for a yes or no column
    – Jonnyboi
    Dec 20, 2022 at 1:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.