yes @Filipe Cruz 

Hi Sneha,

So, you can run a script like this:

var param1 = current.getValue('sys_id');
var scriptResult = true;

var evaluator = new GlideScopedEvaluator();
evaluator.putVariable('param1', param1);
				
scriptResult = evaluator.evaluateScript(current, '<name_of_the_field_that_contains_the_script>', null);

 

Then, in the field that contains the script, you can use "param1" as it was declared.

This is a very powerful tool to use!!

Please, if this answer is relevant for you, please mark it as correct and helpful.

Thanks,

Filipe

@Filipe Cruz  I want it more dynamic. there are multiple scripts in my table so workflow should be able to execute all

Gaurav Shirsat
Mega Sage

Hello Sneha,

Kindly send Screenshot what you are doing.

also explain use case in brief.

Mark my Response as Correct or Helpful, if you find it Appropriate.
Gaurav Shirsat : ServiceNow Community MVP 2022
https://www.linkedin.com/in/gauravshirsat/

@Gaurav Shirsat  please refer to url : https://community.servicenow.com/community?id=community_question&sys_id=684c99fedb6a4110ae812509139619ec