Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

Is it possible to display field value by combining two fields?

Thrupthi
Tera Expert

I have two fields on my form

1. Provider

2. Associated Phone Number

I want the third field "Name" to display by combining the value of these two fields

Example:

Provider = Sim

Associated phone number = 12345

Name = Sim - 12345

Can we achieve this?

find_real_file.png

 

17 REPLIES 17

The field name is just "name"

It displays me the value on save as expected

find_real_file.png

 

But i am facing issue when i go to Mobile phone form record, and if i try to select this name (As i have given reference of Sim table) to that it will show me the value but pops out when i select, i cant select it or retrieve this information. I feel its because the SIM name gets selected by combining the provider and phone number information? Not really sure could you please help

 

find_real_file.png

What do you mean "Pops out"?

 

 

I mean to say the names which are saved with the help of this script cannot be selected; like in i get an option to click on it but it do not consider the values, it just emerges out 

Make Name field a calculated value.

Right click on the name field and configure dictionary. Check calculated check box and add this in the script.

(function executeRule(current, previous) {
var provider= current.provider_varible;  //replace variables correctly
var phone= current.assosciated_phone_variable //replace variables correctly
var result = provider +'-'+phone;
return result;

})(current, previous);


Please mark my response as correct and helpful if it helped solved your question.
-Thanks

No even this does the same, the value just emerges out upon selection and it will not allow to save the record