How to format reference field values on form, 1st letter in caps, remaining small
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-12-2023 08:24 AM - edited 12-12-2023 08:42 AM
Hello community, I need help:
I have reference variable which is referenced to core_country.
the values here are not formatted, some are fully capitalized and some fully small letters.
the values on the table cant be changed because its coming from user records.
So, on form can values be shown in formatted manner?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-12-2023 08:54 AM
@Nikhil80 I doubt if you will be able to change this without making the changes on the table being referenced in the reference field. Another option could be to add an additional field (Country Name) on the form on which the value would be set via an onChange script. This onChange script will run on the country field and will set the value on the Country Name, and you can apply string transformation e.g. toUpperCase()/toLowerCase() to format the country name.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-13-2023 02:43 AM - edited 12-13-2023 02:50 AM
@Sandeep Rajput If I create new field how can I use it for this field as it is reference field. Only 1 reference field should be visible to user on portal.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-13-2023 06:03 AM
@Nikhil80 Creating another filed would be a temporary solution, I recommend you to run a fix script to fix all the country names once it for all as the similar issues would arise in other cases too and adding new fields would not be an optimal solution in all the cases.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-13-2023 05:31 AM
Hi @Nikhil80
No, it is not direct possible, bcz at last data is coming from one source only. So need to update the table where this data is stored. or use the script told by expert @Sandeep Rajput
If my response proves useful, please indicate its helpfulness by selecting " Accept as Solution" and " Helpful." This action benefits both the community and me.
Regards
Dr. Atul G. - Learn N Grow Together
ServiceNow Techno - Functional Trainer
LinkedIn: https://www.linkedin.com/in/dratulgrover
YouTube: https://www.youtube.com/@LearnNGrowTogetherwithAtulG
Topmate: https://topmate.io/atul_grover_lng [ Connect for 1-1 Session]
****************************************************************************************************************