Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

Trying to access variable value from workflow to script include

ak48
Tera Contributor

Hi,

I have a script include and there is a value stored in the variable and I have to access that value from workflow run script then how can I access that value? Please help me on this 

Thanks

1 ACCEPTED SOLUTION

Try this

var myScript = {  //myScript - script include name
  getValue: function() {
var abc = gef[1];
    return abc;
  }
};

// In your workflow script
var myIncludedScript = gs.include('myScript');
var value = myIncludedScript.getValue();
gs.info(value); 

View solution in original post

10 REPLIES 10

ak48
Tera Contributor

It is not helpful and not working