Discussion
How to Manipulate DateTime Properties
Hey Pega Community,
Once again, I am new to Pega and I am working on this little function.
So I want to display an Icon after 1 second has elapsed. In JavaScript the way to do this is giving the icon and ID and then simply using the setTimeOut() function.
In Pega i am not sure how to fully do it.
I have set up a DateTime Object that currently has no value.
I would like to know how to initialize such property to the current date and time (I know there is a function called @currentdatetime and there is a .pxCreateDateTime, but I am not sure how to set a DateTime property using these, am I supposse to simply call a data transform and paste @currentdatetime or .pxCreateDateTime in the field next to "equals to" ?).
I also want to know how I can display this DateTime property on the screen, to check that is the correct time I am looking for.
Thank you all for helping or just looking through this,
Very much appreciated,
Roberto
Display an icon after 1 second has elapsed after what?
If there is some Event (click, change, enter) you can execute a "Run script" Action that calls SetTimeout.
Then Refresh the section calling a transform that sets a property equal to @CurrentDateTime().
Your icon has a Visiblity condition that says it should only be visible when the datetime property is not equal to """.
Display the datetime property in the same section using the same Visible When condition.