Built something you're proud of? Tell the story. A quick G2 review of App Engine or Build Agent helps other developers see what's possible on ServiceNow. Share your experience.

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

Your Workflow should be on RITM Table, you can use current.variables.variablename.getDisplayvalue() 

what are the variable types of the 3 variables?


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
5x ServiceNow MVP

type of the 3 variables are multi line text

 

Can you share the expected output for below example?

Do you need your output as 1 : 2 : 3 : 1:...or 123 : 1234

find_real_file.png


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
5x ServiceNow MVP

Need to populate below values in 3rd variable (ad_group) in a single line format example: FEP_ALL; FEPMemberProdSrv; FEPClaimsProdSrv; INFEPApps-BU; Gag3papnas001a_dept_CORPCOL.GRO.1-RW etc

 

find_real_file.png

Not applicable

Hi,

You can refer to this thread:

https://community.servicenow.com/community?id=community_question&sys_id=fb3a02cfdb9a3fc014d6fb2439961944

 

Mark my answer correct & Helpful, if Applicable.

Thanks,

Sandeep