102
Views
3
Comments
Button with countdown timer inside
Application Type
Reactive
Service Studio Version
11.54.7 (Build 62326)

Good day friends!
Anyone here experienced to make this kind of timer inside of a button. Please see screenshot for reference. An OML will be a big help.

UserImage.jpg
Kay Lun

Hi RD.,

Instead of an OML, I would suggest to create your own function instead.

Here's what I think it might work.

  1. Make the Button as a block
  2. create a local variable let's say Counter, and assign the default value as 10, which would be how many seconds before it enable.
  3. create an OnReady event, inside the event create a javascript function and iterate it, make sure you passed the Counter to the function
  4. then return counter value back and assign back to the local variable Counter.
  5. In you button enable property, check if the Counter is 0

Bonus, you could return the counter from javascript and assign the return integer into the local variable so you will know how many seconds left.

Hope this could help you to get a better idea :)

Cheers.


2024-09-12 02-43-38
Deepsagar Dubey

Hi RD.

You can use expression widget  inside button instead of text widget, Create a variable named i.e. TimerValue,

and in you button expression widget use this like - "Back to customer queue list " +  TimerValue

I hope it'll help you

Thanks
Deep


2023-03-16 04-58-56
Ashish Lonkar

Hello RD,

I am sharing a project below.

please find the OAP attachment, let me know if you need any changes in it.


Thanks AWL!

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