How to get check box value in run script

siddharth29
Mega Contributor

Hi team,

I am trying to design a work flow like the below screen shot.

Capture.PNG

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.

1 ACCEPTED SOLUTION

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


View solution in original post

10 REPLIES 10

hi brain,



yes actually the check box field is "Computer" and label name is "u_computer"



Thanks.