concatenation
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-03-2022 09:53 AM
I am trying to concatenate two string fields and nothing seems to be working. Anyone have any idea
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-05-2022 05:52 AM
var grade = g_form.getDisplayValue('u_grade'); //example - Grade
var step = g_form.getDisplayValue('u_step'); //example - Step
//Combine grade + step = GradeStep
var grades = grade + step ;
//Combine grade + " " +step = Grade Step
var grades = grade + " " + step ;
Shakeel Shaik 🙂
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-03-2022 10:01 AM
Hi Mick,
Can you have a loot at this link - https://community.servicenow.com/community?id=community_question&sys_id=d4c77bdadbfe1f801cd8a345ca9619dd
It has the same query and has been marked as a correct answer.
Regards,
Deepankar Mathur
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-05-2022 01:31 AM
I have tried may way but is there any other way that setDiplayValue to Display on the for?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-05-2022 01:48 AM
I just tried with OnSubmit Client script.. It was working fine.. if you can share your script I will look into it.
Tested Script.
function onSubmit() {
var field1 = g_form.getValue('u_raghu');
var field2 = g_form.getValue('u_last');
var conCat = field1 + field2;
g_form.setValue('description' , conCat);
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-05-2022 07:02 PM
Good Evening,
I was trying it Onchange and its suppose to get an input value from the 2 fields and display the concatenation on the third field.
var grade = g_form.getValue('u_grade');
var step = g_form.getValue('u_step');
var grades = g_form.getValue('u_grade_step');
grades= ('u_grade', 'u_step');

If my response is useful, Please mark the answer as correct/helpful , or let me know if you need any help.