web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Help with Trigger Cond...
Power Automate
Unanswered

Help with Trigger Conditions with SharePoint

(0) ShareShare
ReportReport
Posted on by

Hi,

 

I have a trigger condition (shown below) to filter a SharePoint Item by Column 'Gate Review Status' is 'Complete'. I have this expression: @equals(triggerOutputs()?['body/Gate_x0020_Review_x0020_Status/value'], 'Complete').

 

I've also tried as 

@equals(triggerbody()?['body/Gate_x0020_Review_x0020_Status/value'], 'Complete'). 

 

I tried 

@equals(triggerBody()?['Gate_x0020_Review_Status']?['value'],'Complete'). Every time my test doesn't fail, but it just keeps running. If I take the 

 

chelclayne_0-1611339681581.png

 

Categories:
I have the same question (0)
  • Pstork1 Profile Picture
    68,697 Most Valuable Professional on at

    Take a look at the incoming JSON when the trigger fires.  I've found that you can't do a trigger condition on a complex object like a choice column.  But if you look closely you will see a section of the incoming JSON similary to the one below.  This highlights a Status Choice column.  As you can see there is a Status#Id property.  This is the index of the selected choice.  Although you can't filter the trigger on the value of Status you can filter on this Id.

    image.png

  • Community Power Platform Member Profile Picture
    on at

    chelclayne_0-1611343819516.png

     

    I'm not having any luck with that, either.

     

  • Pstork1 Profile Picture
    68,697 Most Valuable Professional on at

    Not the ID of the Status field.  There should be a property in the first level that is a simple integer called something like 'Status#Id' where Status is the name of the field.  The trigger query can't expand the complex object but it can access the first level simple properties.

    image.png

  • Verified answer
    Community Power Platform Member Profile Picture
    on at

    this was the expression that ended up working...

     

    @equals(triggerOutputs()?['body/GateReviewStatus/Value'],'Not Ready')
  • Community Power Platform Member Profile Picture
    on at

    @Pstork1, I am trying to use a trigger condition to execute only when my Sharepoint List's Status column choice is changed to Completed.  I tried both trigger condition expressions in the "When an item is created or modified" action but only works when I have nothing specified in the trigger condition under settings of this action.   

     

    I saw your first comment from 1/22/21 in this post, that trigger conditions do not work for choice columns.  Do you know if this is still the case?  I would like to only have this flow execute upon the Status field changing to Completed vs. anytime any column change in the list.  In my No condition I am using Terminate with the Cancelled output so I know when the Status column has/ has not been set to completed.         

     

    @equals(triggerOutputs()?['body/Status/Value'],'Completed')

    @not(equals(triggerOutputs()?['body/Status/Value'],'Completed'))

  • Pstork1 Profile Picture
    68,697 Most Valuable Professional on at

    You can't do a trigger condition that will only pick up that the Status has been Changed.  The following will fire whenever the item is changed if the Status is "Completed"

    @equals(triggerOutputs()?['body/Status/Value'], 'Completed')

    To do what you want you then need to have something in the flow that fires that first time which records that the Status was changed to Completed.  Your Second Trigger condition would then be based on whether that value was still in its initial State.  If it isn't in that initial state then the modification isn't the first time the record was modified with Status Completed and the flow shouldn't trigger.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 522 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 364 Moderator

#3
abm abm Profile Picture

abm abm 243 Most Valuable Professional

Last 30 days Overall leaderboard