- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-10-2016 09:39 PM
Hi team,
I am trying to design a work flow like the below screen shot.
and in run script i mentioned script like,
answer = ifScript();
function ifScript() {
gs.log("@@@@hgst items"+current.variables.u_computer);
if (current.variables.u_computer== "true") {
return 'yes';
}
return 'no';
}
if "computer check box is checked by user" then the request should go the "approval group as designed in workflow".... when i kept gs log also check box value is not getting in logs.
please guide me how to get check box value if it is checked request should go approval group
thank you.
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-10-2016 11:10 PM
Hi Prabhakar,
Please edit your previous post and remove the password.
I tried to reproduce on my instance and it didn't worked..Later on I realized that I am doing the same mistake...:P
You should not use "Run Script" for this and it should be the "If" activity with the script as below
answer = ifScript();
function ifScript() {
if (current.variables.u_computer == 'true') {
return 'yes';
}
return 'no';
}
P.S : I didn't login to your instance so please make the necessary modifications.
I hope this helps

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-10-2016 09:58 PM
Can you share the screenshot of the variable pls
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-10-2016 10:15 PM
Hi Pradeep,
https://dev15063.service-now.com
ID-admin
Password-Pr3@prabha
please go to maintain items "test" and the attached workflow
thanks
https://dev15063.service-now.com

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-10-2016 11:10 PM
Hi Prabhakar,
Please edit your previous post and remove the password.
I tried to reproduce on my instance and it didn't worked..Later on I realized that I am doing the same mistake...:P
You should not use "Run Script" for this and it should be the "If" activity with the script as below
answer = ifScript();
function ifScript() {
if (current.variables.u_computer == 'true') {
return 'yes';
}
return 'no';
}
P.S : I didn't login to your instance so please make the necessary modifications.
I hope this helps
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-11-2016 03:29 AM
Thank you vry much pradeep it is working and also i marked this as correct answer 🙂

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-10-2016 09:45 PM
Hi Prabhakar,
Have you verified the variable's name? Variables are not like regular table fields, I don't believe the "u_" prefix is required for variables that you've created.
Thanks,
-Brian