Current date in array widget

213 views
Skip to first unread message

ii2team...@gmail.com

unread,
Oct 30, 2014, 1:44:35 AM10/30/14
to suppor...@runmyprocess.com
The requirement is to initialize and display the current date in the array widget field as we press on the '+' button. I have tried the script explained in the given link:
http://docs.runmyprocess.com/Developer_Guide/Web_Interface/JS_Code_Examples/Initialization_Widget_Date
I have implemented this script to the add rows script section with no luck.
I also tried it in a script outside the table.
Sample code: (In the add rows script)

my_date = new Date();
currentTime = Math.round(my_date.getTime()/ 1000);
RMPApplication.setVariable("tbl_variable.col_variable[P_index]",currentTime);

Thanks in advance

ii2team...@gmail.com

unread,
Oct 30, 2014, 2:52:36 AM10/30/14
to suppor...@runmyprocess.com, ii2team...@gmail.com

Do I need to be more specific?? I have asked this question two times yesterday and once today. No replay at all. Someone please respond

Rajesh Chandgothia

unread,
Oct 30, 2014, 3:33:51 AM10/30/14
to suppor...@runmyprocess.com
Hi,

Please add below javascript code in separate column of array widget.

 function convert_date_to_numeric()
 {
        var date = new Date();
var res = date.setTime(date.getTime());
date = new Date(res);
var res1=Math.round(res/ 1000);
return res1.toString();
 }
id_datearray.id_daten[P_index].setValue(convert_date_to_numeric());

Regards,

Rajesh Chandgothia




--
Fujitsu - RunMyProcess
---
You received this message because you are subscribed to the Google Groups "RunMyProcess Support Forum" 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/c1732020-6c49-424f-b09e-d1e003fdd5a3%40runmyprocess.com.

ii2team...@gmail.com

unread,
Oct 30, 2014, 5:09:30 AM10/30/14
to suppor...@runmyprocess.com
Thanks Rajesh,This code did the magic
Reply all
Reply to author
Forward
0 new messages