Trigger condition based on drop down choice column in sharepoint list

Cameron Coventry 96 Reputation points
2022-01-04T20:51:04.12+00:00

Hello,

I am trying to create a trigger condition that starts a flow when an item is modified and a single column's value is set to Closed.

Here is my list settings:
162352-image.png

Here is my Flow:
162381-image.png

Here is my currently broken Trigger Condition:
@equals(triggerOutputs()?['body/field_3'], 'Closed')

Here is the error message I receive when trying to test(Saving is successful)
162286-image.png

Whenever I try to modify an existing item, the flow does not run with trigger condition. I know how to make this with the control cards, but I need the trigger condition.

Any help or advice is greatly appreciated.

Microsoft 365 and Office | SharePoint | For business | Windows
0 comments No comments
{count} votes

Accepted answer
  1. Allen Xu_MSFT 13,861 Reputation points
    2022-01-05T01:57:03.927+00:00

    Hi @Cameron Coventry ,

    Use below formula as trigger condition, your flow will run successfully:

    @equals(triggerBody()?['RiskStatus']?['value'],'closed')    
    

    ----------

    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


2 additional answers

Sort by: Most helpful
  1. Cameron Coventry 96 Reputation points
    2022-01-05T18:55:02.977+00:00

    @Allen Xu_MSFT Thank you for trying to help me, but unfortunately this did not work. My flow still does not even trigger when modifying or creating an item. Is there another approach you can think of I can try?

    Here is my flow with your trigger condition. I am modifying by editing the item in grid view on SharePoint.
    162537-image.png


  2. Josh Cagle 0 Reputation points
    2023-01-13T14:05:47.63+00:00

    Cameron,

    Not sure if you've gotten an answer to this yet, but here is the reason your flow isn't running: There's a space.

    Your field is 'Risk Status' not 'RiskStatus'. But flows cannot have spaces in fields, you need to replace the space with x0020 and an underscore on both sides. (Sorry the formatting code for this site won't let me place the underscores correctly)

    The easiest way to know the correct schema name for any field in a SharePoint list is to open the Library Settings, click on the field under the Columns section to open its 'Edit' page, in the URL bar at the very end will be Field= and then the schema name of the field. Just copy this.

    So in your case it should be:

    @equals(triggerBody()?['Risk_x0020_Status']?['value'],'closed')
    
    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.