23
Views
2
Comments
generate a random  digit number  using GetRandomInt(100000, 999999) for each 30 sec

how to generate a random  digit number  using GetRandomInt(100000, 999999) for each 30 sec even when the application is offline

2019-11-11 17-10-24
Manish Jawla
 
MVP

Hi @Jayaprakash R ,

You can use timer to do this kind of stuff.

https://learn.outsystems.com/training/journeys/async-processing-timers-586 

regards,

Manish Jawla

2025-08-07 06-30-56
Amit J
Champion

Hi ,

Use a local variable to store the generated number.
Use a Timer or setInterval in JavaScript to generate a new number every 30 seconds.
Use GetRandomInt(100000, 999999) to produce the number.
Update the UI so the user sees the new number dynamically.
Since this is offline, everything must be client-side only.


You can use the below code in java scriptnode to get random number 

Math.floor(Math.random() * (999999 - 100000 + 1)) + 100000;

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