Initializing a date widget

224 views
Skip to first unread message

pour...@gmail.com

unread,
Oct 9, 2015, 10:54:03 PM10/9/15
to Fujitsu RunMyProcess Developer Community
Hi, new to RMP and trying to initializing a date widget to current date. Found this code which says:

Create a calculated field with following JS code :

my_date = new Date();
currentTime = Math.round(my_date.getTime()/ 1000);
RMPApplication.setVariable("my_widget_date_variable",currentTime);

What's a calculated field? Where do I put this code? Date widget initialization property does not accept JS code, where does this code go?

Thanks

Pankaj Kumar

unread,
Oct 10, 2015, 1:10:53 AM10/10/15
to Fujitsu RunMyProcess Developer Community
Hi,

To set the date value in date widget in Web interface, please use the below code.

my_date = new Date();
currentTime = Math.round(my_date.getTime()/ 1000);
id_my_widget_date_variable.setDate(currentTime );

where id_my_widget_date_variable is date widget identifier.

Thank you,
Pankaj Kumar
Fujitsu RunMyProcess Support


--
Fujitsu - RunMyProcess
---
You received this message because you are subscribed to the Google Groups "Fujitsu RunMyProcess Developer Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email to supportforum...@runmyprocess.com.
To post to this group, send email to suppor...@runmyprocess.com.
Visit this group at http://groups.google.com/a/runmyprocess.com/group/supportforum/.
To view this discussion on the web visit https://groups.google.com/a/runmyprocess.com/d/msgid/supportforum/449dbe58-b223-4ee7-b560-c6327c239149%40runmyprocess.com.
For more options, visit https://groups.google.com/a/runmyprocess.com/d/optout.

pour...@gmail.com

unread,
Oct 10, 2015, 12:47:28 PM10/10/15
to Fujitsu RunMyProcess Developer Community
Pankaj, I did not need the code, I need to know where the code goes. Where exactly do I put the code?

Thanks

Bidisha Das

unread,
Oct 10, 2015, 1:58:40 PM10/10/15
to suppor...@runmyprocess.com
Hi,
Firstly,you need to take a date widget on Web Interface with numeric date variable "my_widget_date_variable".Then,take a java script widget and write the below code in that:

my_date = new Date();
currentTime = Math.round(my_date.getTime()/ 1000);
RMPApplication.setVariable("my_widget_date_variable",currentTime);

The current date will be automatically set in the date widget.


Thanks & Regards
Bidisha

pour...@gmail.com

unread,
Oct 10, 2015, 3:17:42 PM10/10/15
to Fujitsu RunMyProcess Developer Community
Got it, thanks!

Reply all
Reply to author
Forward
0 new messages