How to truncate a value?

User205031
Tera Contributor

Hi,

There is reference field which refers an application table which contains value as 'ABC XYZ'. So when a user selects a value from that field, the reference field should display value as 'ABC'. It should display values without 'XYZ' keyword.

Is it possible to achieve?

Thanks in advance!

1 ACCEPTED SOLUTION

No you cannot change the display value of the reference field apart from the fields which are present in your base table. So if you want to display something else then you might have to create a custom field in your table and populate the value of first half of the application there via some script and then set the display value of the custom field to true. 

Post this you when you will select the same filed as reference in your catalog item then it will show only ABC.

Below thread might provide you more clarity on the same. Read the answer provided by Pradeep Sharma.

https://community.servicenow.com/community?id=community_question&sys_id=6535afb9dbf567005d782183ca961978

 

Please mark this answer as correct and helpful.

 

Thanks,

Mohit Kaushik

Thanks,
Mohit Kaushik
ServiceNow MVP (2023-2025)

View solution in original post

5 REPLIES 5

Saurav11
Kilo Patron
Kilo Patron

Hello,

In the reference field the value which is shown on the field is the display value field of the table.

So if you want to show some other as a display you can configure dictionary that field and click on display as true

Please mark answer correct/helpful based on Impact.