Skip to main content
Hi, is it possible to exit from a trigger loop based on times? For example, i want that a user has only 5 minutes to complete some fields in a form. If this time expires I want to exit from the loop with an error.

Hi @Alberto Alberti​ ,

 

We can't do that, at least not yet.

What we can do, is check if the user has spent more than 5 minutes on the form by storing the time before it enters the trigger loop, and comparing it with the time after it exists the trigger loop.

 

You could also go a step further and include a message(label) to inform the end user that the inputs he/she provides will become invalid if it isn't done within 5 minutes as it breaches the SLA.

 

Kind Regards,

Ashwin A.K


Hi @Alberto Alberti​ ,

 

Sorry but its not exactly a workaround.

There is no escaping the fact that the user has to interact with the form until it closes and we can only perform the evaluation after the form closes.

 

We can record the time before it enters the loop and then capture the time after it exists the trigger loop and compare the difference between the two time intervals to check if its exceed five minutes using the DateTime Utilities Package: Difference Between Dates.

image 

imageIts a bit of a stretch and doesn't exactly fit the requirement, which is why I wouldn't categorize this as a workaround.

 

Kind Regards,

Ashwin A.K


Sorry, I don't understand the workaround.

How can i compare the two moments? Inside the loop i cannot use commands except "Trigger loop: Handle".

 

 


@Alberto Alberti​ 

Import this file in your control room.

This will add a trigger option, which will allow you to add trigger time.

You can set that to whatever future time you want.

image


Wow that's amazing!

 

@Alberto Alberti​  if @Sumit Kumar​  was able to help you out then we'd appreciate it if you could mark his solution as "Best" so that others facing similar issues may benefit from it as well.

 

Kind Regards,

Ashwin A.K


Now it works. Thank you


Reply