cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Teresa24486
Post Prodigy
Post Prodigy

Trigger condition on the control

Hi,

I have a trigger control- when an item is created on SP list. I need the trigger to run only after 5 mins i.e after a file gets uploaded on another doc lib. How do i put the trigger condition as as an expression on the control.

Teresa24486_0-1648028936534.png

 

10 REPLIES 10
KvB1
Solution Sage
Solution Sage

I'm not sure this is possible within the trigger, but you could just create a delay action to run after the trigger

Hi

I need the trigger to run only after a delay. Isnt this possible with a condition?

KvB1
Solution Sage
Solution Sage

You can add a delay action after the trigger

 

The flow will trigger when an item is created, but every action after the delay action will only be executed after the delay has passed

Hi @KvB1 ,

Can we not have something like to run the flow only after another flow has completed?

KvB1
Solution Sage
Solution Sage

I dont think there is a trigger that goes 'when other flow has completed'

 

Would it not be possible to use a delay, or combine the flows?

I suppose if you would really want you can send a mail at the end of one flow, then use 'when a mail arrives' with a very specific filter to trigger another one, but it seems that you should be able to prevent the need for this funky construction

Hi @KvB1,

The excel file that goes into the library is not formatted in a table, so i add additional steps to convert the excel file to a table and then to check in the file.

Teresa24486_0-1648035035991.png

 

My next flow should run only after this flow completes as it doesnt detect the table and throws an error in the second flow:

Teresa24486_1-1648035425481.png

 

KvB1
Solution Sage
Solution Sage

Okay, well, if you don't think adding a delay after the trigger of the second flow will fix it, and its not possible to combine the flows, I guess you can try and get creative.

 

For example, you could add a column to the sharepoint library where you track if the flow is done with that file. As the last action for the file in the loop, you could give that column a specific value.

 

Then you could use the 'when an item or file is created or changed' trigger for the second flow, and use the odata filter query to filter on the column value that only gets added in the last step of the first flow

Hi @KvB1 ,

I created the above additional step of workflow status:

But the file lock error breaks the flow now:

The file \"https://abc.sharepoint.com/sites/Test/Documents/SP/123.xlsx\" is locked for exclusive use by xyz@abc.com\r\nclientRequestId: 86ec23bc-e314-42f7-b09b-c34d0b1e7fe7\r\nserviceRequestId: 86ec23bc-e314-42f7-b09b-c34d0b1e7fe7

Hi @KvB1 

I got the first flow working with the additional column getting updated to 'workflow completed'. I used a trigger condition on a SP trigger- When a file is created. Trigger condition is seen below. I was expected the second workflow to trigger soon after the column was updated to 'workflow completed'. But nothing happens at all, there is no run history. Please advise.

Teresa24486_0-1648196316373.png

 

KvB1
Solution Sage
Solution Sage

I think the issue here is that the item is created in the first flow with the workflow status column not matching the trigger condition in the second flow.

 

If you use the trigger 'when a file is created or updated' instead of the trigger 'when a file is created' in the second flow, it will trigger the moment the first flow updates the field 'Workflow1Status' to 'Workflow Completed'

Helpful resources

Announcements
 WHAT’S NEXT AT MICROSOFT IGNITE 2022

WHAT’S NEXT AT MICROSOFT IGNITE 2022

Explore the latest innovations, learn from product experts and partners, level up your skillset, and create connections from around the world.

Register for a Free Workshop.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

Users online (2,391)