I need to start an approval with flow when only a user change the properties of a document (file) in a SharePoint document library.
So I used 'When a file is created or modified' (properties only) as the trigger for my flow. To set it to start only when someone change the properties I added the following condition.
Modified is equal to Created
So I added the start an approval action to the If No branch of the condition. Because I don't want to start it when a file is being created. But when I try running this flow when creating a file or when modifying file properties it always becomes true in the condition mentioned above. How can I make it to run only when a user change properties of a file?
@Anonymous
I haven't tested myself, since there used to be a trigger only for updates; but as far as I have read it has been substituted by this new trigger you are using.
My recommendation is to add a couple of Compose action blocks before the condition, assign "Created" and "Modified" vaules to each of them; and reexecute the flow. Then go to Run History, and inspect such values.
Actually you don't need to add these action blocks but inspect the outputs of the Trigger in old iterations, but it is easier to see these specific fields by adding Compose action blocks.
If you find the way to identify items updated vs items created please share with us you conclussions
Thank you in advance!
Proud to be a Flownaut!
Hi janakavae,
According to your scenario, I created a flow to start an approval email when created time is not equal to modified time.
A screenshot of my flow:
When the file is newly created, the Condition will return True, the action Start an approval won’t be started. While when the file is modified, the Condition will return False, then an approval email will be sent.
PS: For testing, I add two compose actions to get the return value of Modified and Created. So that I know that they are actually different.
Please try again with it. I assume this should work for you.
Best regards,
Mabel Mao
Hi @Anonymous,
What's your current siguation?
Have you tried it again?
Hope it is working for you now.
Best regards,
Mabel Mao
Hello
I am interested by yr flow process, I don't understand how you create your "compose" blocks. Can you make more screenshots pls ?
Thx
Hi there,
I am doing my own tutorial on the Trigger: "When a file is created or modified (properties only)". From the history, i found the flow is executed after a file is uploaded to Document library. After that I tried to edit/amend the properties / fields of the item but the flow is not trigger. Anyone can advice this?
Thanks with regards,
CY
User | Count |
---|---|
78 | |
54 | |
52 | |
42 | |
42 |
User | Count |
---|---|
81 | |
79 | |
76 | |
68 | |
43 |