Reference field display value on only one catalog item

damienharrisuta
Tera Contributor

So I am creating a new item for our catalog. One of the requirements is that our Department field, which is a reference to the department from the user profile, displays the 'department.id' + 'department.name' which is from the cmn_departments table. I have attempted reference qualifiers, attributes, default values, etc with no luck. 

The variable set that was created contains the following fields with the default values. We use these for almost all of our catalog items currently and have no issues...

 

Requested For : Default Value=javascript:gs.getUserID();

Department: Default Value=javascript:gs.getUser().getRecord().getValue('department');

Phone: Default Value=javascript: gs.getUser().getRecord().getValue('phone')

 

My question is how do I go about changing the display value for only this one form so that users will see 

Department: 111111 Department Name

instead of 

Department: Department Name

 

Any help would be greatly appreciated.

2 REPLIES 2

Jaspal Singh
Mega Patron
Mega Patron

Hi Damien,

 

Unfortunately that is display value as you are already aware. For your scenario suggestion is to created a calculated field that will be combination of Department Number & Name & then can be used as Display field but it will be at all places where the Department is referenced & not specific to one item as you need.

Suggestion is to create a new variable & populate Department ID then.

 

 

Anil Lande
Kilo Patron

Hi,

It is not possible to change display value for any specific form or field. A table can have only one display value at a time. If you change display value the it will be applied on all the form having reference field referring to a table.

An alternative for your particular catalog item would be to create an additional variable(string type) just after the Department variable and auto populate its value based on selected department (make this variable readonly and use onChange client script to set Value based on department ID + Name).

 

Thanks,

Anil Lande

Please appreciate the efforts of community contributors by marking appropriate response as correct answer and helpful, this may help other community users to follow correct solution in future.
Thanks
Anil Lande