How to set multiple variable values in a single variable using Run Script(workflow)

Anusha25
Tera Contributor

After creating Request, few variables like,

variable 1 : A 
                  B
                  C
                  D

variable 2: A1
                  B1
                  C1

variable 3:A2
                 B2
                 C2 etc

In Variable 4(multiple line text)the above 3 variable values should populate  with semicolon and space for each value.

29 REPLIES 29

Voona Rohila
Kilo Patron
Kilo Patron

Hi Anusha

You can use below logic in your runscript.

current.variables.<<multiline_variablename>> = current.variables.variable1 +" : "+ current.variables.variable2 +" : "+current.variables.variable3;

Mark it helpful if this helps you to understand. Accept solution if this give you the answer you're looking for
Kind Regards,
Rohila V
2022-25 ServiceNow Community MVP

Tried ,not working

 

Hi anusha

Can you share the code you tried and also more info on what is not working.

Also keep logs in your run-script to check the variable values.


Mark it helpful if this helps you to understand. Accept solution if this give you the answer you're looking for
Kind Regards,
Rohila V
2022-25 ServiceNow Community MVP

find_real_file.png