Forum Discussion
RJDBakker
Feb 28, 2022Copper Contributor
How to trigger a flow based on change in title column of documentset?
I am trying to trigger a flow only when the columns (metadata) of a documentset is changing. My documentset consists of several columns and standard folders. For business reasons I want to trigger ...
- Mar 07, 2022
RJDBakker
In this case, have you tried to add the additional, required condition within the triggers` settings?@and( NOT(equals( triggerBody()?['Title'], triggerBody()?['{Name}'] ) ) , equals( triggerBody()?['{ContentType}']?['Id'], '0x0123456789abcdefghijk9876543210kjihgfedcba' ) )
Micca0815
Mar 02, 2022Iron Contributor
RJDBakker
You could accomplish this with an additional action and a condition after your trigger.
Look for the SharePoint connector action 'Get changes for an item or a file (properties only)'.
This way you get the columns which have been changed by comparing them to the previous version ('Since' expression below).
Dynamically link the site and the library from the triggers properties:
- site: trigger()?['inputs']?['parameters']?['dataset']
- library: trigger()?['inputs']?['parameters']?['table']
- ID: triggerOutputs()?['body/ID']
- Since : sub(int(triggerOutputs()?['body/{VersionNumber}']),1)
Afterwards use a condition to check if the title column returns true for any column change:
outputs('Get_changes_for_an_item_or_a_file_(properties_only)')?['body/ColumnHasChanged/Title']
This would not avoid the additional Flow run, but at least any action could depend on a certain column change only.