Output variable

503 views
Skip to first unread message

nsbx.b...@gmail.com

unread,
Nov 28, 2016, 8:19:40 AM11/28/16
to Fujitsu RunMyProcess Developer Community
Hello i have som trouble with an output variable.

I have created a output variable named validation_dg_date with value this script :

<@script env="javascript">
function date() {
var today = new Date();
var dd = today.getDate();
var mm = today.getMonth()+1; //January is 0!
var yyyy = today.getFullYear();
if(dd<10) {
dd='0'+dd
}
if(mm<10) {
mm='0'+mm
}
today = dd+'/'+mm+'/'+yyyy;
return today;
}
setVariable("validation_dg_date", date());
</@script>

But my variable is alway empty after that

I have tried with this script

<@script env="javascript">
function date() {
var today = new Date();
var dd = today.getDate();
var mm = today.getMonth()+1; //January is 0!
var yyyy = today.getFullYear();
if(dd<10) {
dd='0'+dd
}
if(mm<10) {
mm='0'+mm
}
today = dd+'/'+mm+'/'+yyyy;
return today;
}
setVariable("validation_dg_date", date());
</@script>
${validation_dg_date}

And now my variable is not empty but my process return an error.

What is the problem ?

Thank for adavnce

Pankaj Kumar

unread,
Nov 29, 2016, 12:35:35 AM11/29/16
to Fujitsu RunMyProcess Developer Community
Hi,

I executed the js script that you shared, it is running fine. Please refer to attach screen-print. If you are accessing the variable "validation_dg_date" in web-interface, please create a control (RMP Text Input widget) and assigning the same id. and make it hidden. This way variable "validation_dg_date" will be accessible in web interface.

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+unsubscribe@runmyprocess.com.
To post to this group, send email to suppor...@runmyprocess.com.
Visit this group at https://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/9bb95bb1-03bf-442a-805f-19f64fd92798%40runmyprocess.com.
For more options, visit https://groups.google.com/a/runmyprocess.com/d/optout.

1.PNG
2.png

nsbx.b...@gmail.com

unread,
Nov 29, 2016, 4:46:45 AM11/29/16
to Fujitsu RunMyProcess Developer Community
> To unsubscribe from this group and stop receiving emails from it, send an email to supportforum...@runmyprocess.com.
Hi,
thank for your help
I have made same thing than you but is always empty
I have try too with hidden input but same thing

RunMyProcess_-_Opera_2016-11-29_10-43-21.png

Pankaj Kumar

unread,
Nov 29, 2016, 4:52:03 AM11/29/16
to Fujitsu RunMyProcess Developer Community
Hi,

In process parameter, your value is not initialized, kindly share the screen-print how you are executing the js code in process.

Thank you,
Pankaj Kumar
Fujitsu RunMyProcess Support

To unsubscribe from this group and stop receiving emails from it, send an email to supportforum+unsubscribe@runmyprocess.com.

To post to this group, send email to suppor...@runmyprocess.com.
Visit this group at https://groups.google.com/a/runmyprocess.com/group/supportforum/.

nsbx.b...@gmail.com

unread,
Nov 29, 2016, 5:31:13 AM11/29/16
to Fujitsu RunMyProcess Developer Community
RunMyProcess_-_Opera_2016-11-29_11-30-30.png

Pankaj Kumar

unread,
Nov 29, 2016, 5:51:51 AM11/29/16
to Fujitsu RunMyProcess Developer Community
Hi,

Please share the screen-print of the process instance, and kindly confirm that "Validation DG" activity is executed, also if you are checking the value of the variable "validation_dg_date" on ""Validation" DG" activity, please put this code on "Input variable" tab not on "output variable".

Thank you,
Pankaj Kumar
Fujitsu RunMyProcess Support

To unsubscribe from this group and stop receiving emails from it, send an email to supportforum+unsubscribe@runmyprocess.com.

To post to this group, send email to suppor...@runmyprocess.com.
Visit this group at https://groups.google.com/a/runmyprocess.com/group/supportforum/.

nsbx.b...@gmail.com

unread,
Nov 29, 2016, 7:13:57 AM11/29/16
to Fujitsu RunMyProcess Developer Community
it's done i have found an alternative
I have created a invisible input
filled when the user click on button
Thank for your help
Reply all
Reply to author
Forward
0 new messages