make reference display the specified field of another table

chenyanwei
Giga Contributor

無題.png

there is a field 'referenceType' reference from table2,how to make the   choices display     specified field of table2,not sys_id as above?

1 ACCEPTED SOLUTION

Shishir Srivast
Mega Sage

Please make the Name (or desired) field as display true in table2.


Navigate to System Defination -> Tables and then search and select the table and then make the desired field as true under column related list.


find_real_file.png


View solution in original post

4 REPLIES 4

Shishir Srivast
Mega Sage

Please make the Name (or desired) field as display true in table2.


Navigate to System Defination -> Tables and then search and select the table and then make the desired field as true under column related list.


find_real_file.png


Uncle Rob
Kilo Patron

Go to System Definition -> Dictionary.


Filter the entries for Table = Table2


Each column in Table 2 has a record in that list.   Find the record for the column you want to act as the Display and set the "Display" property to true.


Uncle Rob
Kilo Patron

Just to drive home an important lesson here.   There should be one thing you come away from this with:
Reference fields only store sys_ids.   They're only useful as a key to the table that stores the actually useful data.   Luckily the SN interface abstracts that out for us.




Some other insights:


- Each table has only one field act as Display.   Whenever you look at a reference field, you can usually tell what the Display value is.   For example, references to User table almost always show User ID. Groups show Group Name.   Companies show Company Name, etc.


- If you used <reference>.getDisplayValue()... how do you suppose it gets the right field to render?   It does a lookup to the table being referenced and finds the column marked as Display.


Community Alums
Not applicable

Hey chenyanwei,


You can do one thing, right click on any of the sysIds and go on configure and select list layout then move right those fields which you want to show while referencing.

configure -> list layout -> move that field which you want to show while referencing.

Hope this will help.