Is it possible to display field value by combining two fields?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-30-2019 07:39 AM
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?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-30-2019 08:03 AM
You could try something like this in an onChange Catalog Client script.
var provider = g_form.getValue('provder').toString();
var phone = g_form.getValue('phone').toString();
var provPhone = provider + phone;
g_form.setValue('name_variable', provPhone)
It looks like your phone variable is using a Reference field. So for that try
var phone = g_form.getDisplayBox('phone').value;
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-31-2019 03:47 AM
Hi CodingSmith
I tried this by creating the Business rule and it worked for me, but i have one issue facing here. only upon save this is displaying the record
so when i select the field from other form it just pops out and doesn't allow me to select the name value can you please help
Business rule:
(function onBefore(current, previous) {
var display = current.u_provider.getDisplayValue() + '\n\n ' + '-' + '\n\n ' + current.u_associated_phone_number.getDisplayValue();
current.name = display;
})(current, previous);

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-31-2019 07:23 AM
Try adding
current.update();

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-31-2019 08:23 AM
is the field name of "Name" is name or u_name?
var display = current.u_provider.getDisplayValue() + '\n\n ' + '-' + '\n\n ' + current.u_associated_phone_number.getDisplayValue();
current.u_name = display;
Also you can use the Calculated field in dictionary and write the script there