how to concatenate all variables
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-22-2018 08:13 AM
Hi All,
I have created a Record producer with 4 variables(Multi line text).It will create a story(rm_story). Now i want to concatenate all 4 variables in description field.How to achive that?
Note: All variables are multi line text.
Regards,
Ram
- Labels:
-
Service Catalog
-
Service Portal
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-22-2018 08:26 AM
Hi Ram
You can try below with before insert business rule
var appendedInfo = '';
for ( var v in current.variables ) {
appendedInfo = appendedInfo + v + ": " + current.variables[v] + "\n";
}
current.description = appendInfo;
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-22-2018 08:26 AM
Hey Ram,
Here is an Example for your Query:
Just write an onChange client script, with condition that none of these fields are empty.
var fName=g_form.getValue(first_name);
var LName=g_form.getValue(last_name);
var ofcLoc=g_form.getValue(office_location);
var comm = fName + "" + LName+ "" + ofcLoc;
comm=String(comm);
g_form.setValue('comments',comm);
Hope this will helps you and let me know if you need more help.
Thanks,
Rajashekhar Mushke
Rising star : 2022 - 2024
Community Leader -2018
Connect me on LinkedIn : Rajashekhar Mushke