Hi,
I have two files in a sharepoint folder and I want to run a flow only when both files are modified in that folder.
The sharepont folder is "/Documentos Partilhados/BI_Imagens" and the files in this folder are "BI_Page_1.png" and "BI_Page_2.png
The flow :
and the condition i' trying to use is:
@And(equals(triggerBody()?['{FullPath}'],'Documentos Partilhados/BI_Imagens/BI_Page_1.png'),equals(triggerBody()?['{FullPath}'], 'Documentos Partilhados/BI_Imagens/BI_Page_2.png'))
But the flow doenst trigger when both files are modified.
Does anyone know how to solve this issue and help me? Are my conditions written wrong?
Thank you in advance!
Hi @PauloC ,
You can use the below to get the filename instead of matching the full path to use in yohr trigger condition.
triggerBody()?['{FilenameWithExtension}']
Please note the following:
* This is available in 'when a file is created or modified (properties only)'. You may need to check to see if it is also available in your folder trigger. If not, swap it across
* Be careful of case sensitivity. You can use toLower() to format everything to lowercase
Here is a reference post
--------------------------------------------------------------------------
If I have answered your question, please mark my post as a solution
If you have found my response helpful, please give it a thumbs up
Connect on LinkedIn
Hi eric,
It works well when i use: @equals(triggerBody()?['{FilenameWithExtension}'],'BI_Page_1.png')
but It doesn't work whem i use: @And(equals(triggerBody()?['{FilenameWithExtension}'],'BI_Page_1.png'), equals(triggerBody()?['{FilenameWithExtension}'],'BI_Page_2.png'))
Hi @PauloC
You can use 'or' to combine the two conditions. Trigger the flow when one of the files is modified.
@or(equals(triggerBody()?['{FilenameWithExtension}'],'BI_Page_1.png'), equals(triggerBody()?['{FilenameWithExtension}'],'BI_Page_2.png'))
If you want to trigger this Flow when both files are modified, I am afraid it is not supported.
Best Regards.
Hi @PauloC
As mentioned above, you will need to use OR which will trigger when either files are modified.
You could look at creating a scheduled flow that checks the timestamp of both files but it won't be instantaneous.
--------------------------------------------------------------------------
If I have answered your question, please mark my post as a solution
If you have found my response helpful, please give it a thumbs up
Connect on LinkedIn
The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.
Announcing a new way to share your feedback with the Power Automate Team.
Learn to digitize and optimize business processes and connect all your applications to share data in real time.
User | Count |
---|---|
70 | |
22 | |
17 | |
17 | |
13 |
User | Count |
---|---|
125 | |
34 | |
31 | |
28 | |
26 |