Pop Up Window using Time of Day


Hello. I have a Pop-Up window that I would like to Pop Up at 05:30 and 17:30. In the script editor, I have started to use dateDiff but am having some difficulty understanding the Instruction. New to scriptiing.

Also wondered if there is an easier way to accomplish this what seems to be an “Easy Task” LOL

Open to help, suggestions, and options

Thanks in advance…

It you want something to happen at a certain time of day one method is to add an expression tag with the following expression:

dateFormat({[System]Gateway/CurrentDateTime},"HHmm") = "1018"

Then create a Client Tag Change Event Script that opens your popup when the expression tag becomes true.

Hi Brandon… I have tried what you suggested but still cannot get the pop up to occur. The Expression tag is working properly but the pop up will not display… Attached is the Expression and Tag Event code that reside in the Expression Tag. What am I doing wrong?


I doubt that the gateway tag events has an access to gui windows.

You would probably have to do something like:
Add your expression tag like:

dateFormat(now(), 'HHmm') = '0530' || dateFormat(now(), 'HHmm') = '1730'

Create a Client Tag Change Event script :

Yeah what @kaushik.shah said.

OK. So I will modify my Expression Tag Expression to reflect
‘’‘dateFormat(now(), ‘HHmm’) = ‘0530’ || dateFormat(now(), ‘HHmm’) = ‘1730’’’’
and
Add the Client Tag Script as shown above. I would then change ‘Popup’ to my Pop Up Name?

Sorry for my lack of this knowledge. I have planned training at IA when all is well in the world…

Yes, Client Event script will have window path to your popup.
Example,
If it’s located inside a folder called popups
then ‘Popups/popup’

Thank you for your help. I was able to use ‘’‘dateFormat({[System]Gateway/CurrentDateTime},“HHmm”)’’’ in my system because it is a stand alone gateway at this time.

Thanks again for the help from both of you… Much Appreciated.

1 Like