- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-21-2024 07:14 AM - edited 08-21-2024 08:27 AM
Is it possible to join the values of two variables and populate a third variable with the results of the join from those two values? For example, let's say I have the following:
Variable 1: Multi Line Text (i.e. example text 1)
Variable 2: Multi Line Text (i.e. example text 2)
Variable 3 (hidden and mapped to a text field on a table): The values of #1 + #2 (i.e. example text 1 example text2)
Thanks!
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-21-2024 07:51 AM
Hi @TStark ,
Why don't you concatenate and update variable 3?
During onSubmit (you can do it onChange as well) - OnSubmit catalog client script.
And aslo what type of field are you maaping on the table, is it string??
var v3= g_form.getValue('variable1').toString().trim()+ g_form.getValue("variable2").toString().trim()
g_form.setValue("variable3", v3);
Thank you,
Hemanth
Certified Technical Architect (CTA), ServiceNow MVP 2024, 2025

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-21-2024 07:51 AM
Hi @TStark ,
Why don't you concatenate and update variable 3?
During onSubmit (you can do it onChange as well) - OnSubmit catalog client script.
And aslo what type of field are you maaping on the table, is it string??
var v3= g_form.getValue('variable1').toString().trim()+ g_form.getValue("variable2").toString().trim()
g_form.setValue("variable3", v3);
Thank you,
Hemanth
Certified Technical Architect (CTA), ServiceNow MVP 2024, 2025
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-21-2024 08:18 AM
Hi @TStark,
It is possible to do in the Record Producer. You can use onSubmit Client Script for this usecase.
var var3 = g_form.getValue('variable1').toString()+ " - " + g_form.getValue("variable2").toString()
// .toString() to be used incase your variables are not of type string.
g_form.setValue("variable3", var3);
Use UI Policy to hide the 3rd Variable rather than adding it to the Client Script.
If you found my reply useful, please mark it as Solution and Helpful. This will help me and the community.
Thanks and Regards,
Ehab