169
Views
4
Comments
Solved
How Stop excution flow for certain time using javascripts

Hello, This is Vishwanath

I am working on a reminder app , and the problem I am facing here is I have list of time for each element which is time ( in hr and min,  ) I have used SetTimeout for a calculated millisecond for that time and in further action flow , I have used messege action to show particular reminder


but what happening here is though, I have used setTimeout but it is executingthe next action which feedback action immediately without waiting to complete Timeout,

Ideally, It should wait to complete the first action(javascript) then move to next action ( feedback action)


2022-08-03 04-32-50
Ravi Punjwani
Solution

Hi Vish,

Remove the feedback message item from your loop, and keep inside the javascript.

Make sure you include it in the callback function of the setTimeout so it executes alongwith that portion of your code.

Use Outsystem's javascript API for achieving this easily, and use parameters on javascript node if you have custom messages to be displayed. So the message content and message type goes as part of setTimeout message call itself.

Reference:

https://success.outsystems.com/Documentation/11/Reference/OutSystems_APIs/JavaScript_API/FeedbackMessage


UserImage.jpg
Vishwanath Holge

Hello Ravi ji,


Thanks a lot , 

 I did exactly you said and It is working !!!!!





Regards

Vish Holge


2022-04-19 13-20-22
Andrea Lembo

Hi,

Check this library Client Timers

The package contains the "Wait" client actions.

UserImage.jpg
Vishwanath Holge

Hello Andrea,


Thanks a lot 

Providing info about this componant I will definitely use this in my project


Regards 

Vish Holge

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.