Forum Discussion
How to trigger a flow based on change in title column of documentset?
- 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' ) )
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'
)
)
I really appreciate your response.
The additional trigger you suggested seems to do the trick.
I replaced the Content Type ID from your example of course.
Although I still find it a bit of a cumbersome way changing the filename trough PowerApps and Power Automate, your solution works! Thank you for your time.
I thought it would be useful to post the complete working flow to understand the context:
I have a flow that is generating a document set. I use a customized PowerApps form to fill in the metadata for the document set. When using a custom PowerApps form, it is not possible to change the filename field. (at the time of writing) Instead I use the ‘title’ field in the form that is available for users to edit.
A Power Automate flow would trigger when this field does change and writes the change also back into the ‘filename’ field. But of course you want to prevent that the flow would start every time a file within the document set would change.
The triggers prevent this from happening:
@equals(triggerBody()?['{ContentType}']?['Id'], '0x0120D52000C5A1E6112625E241BF1968469A689EB7001463D6ACDB134C4CB9D00A39A6072585')
@and(NOT(equals(triggerBody()?['Title'],triggerBody()?['{Name}'] ) ),equals(triggerBody()?['{ContentType}']?['Id'],'0x0120D52000C5A1E6112625E241BF1968469A689EB7001463D6ACDB134C4CB9D00A39A6072585'))
These are set in the 'settings' from the trigger of the flow.