Usually we have Triggers such as “Item Added or Modified” for a list or library. This is a first action in your workflow. Now assume that there is “WaveStatus” field in your list. You want a condition in your Trigger to activate only when Status is equals to “Completed”.
(Assuming your WaveStatus field has “New”, “InProgress”, “Hold” and “Completed”)
The issue with this approach is your workflow will trigger for all conditions even if some made a change to “Hold” from some other values. Even worst the trigger will fire for any field change in your list item.
TTP: Use a “Compose” Action and type a function triggerBody(). Run the once without any actions. Note the output of compose keep copy to understand what comes to your flow as an input. This will be in JSON, I suggest learning a high level anatomy of JSON.
- Click on the ‘…’ on your trigger and select ‘Settings’
- In the Settings dialog, you will be adding the Trigger Condition. Please make a note your expression must have ‘@’ character.
e.g. @equals( triggerBody()?[‘WaveStatus’]?[‘Value’],’Completed’)
This will allow your work flow to trigger only when item is modified with the value WaveStatus=’Completed’. This will prevent unnecessary workflow run.