- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-19-2023 02:30 AM - edited 09-19-2023 02:54 AM
Hi everyone,
I need to change the display value of a reference field on case table.
Both fields a reference on asset table and I have set the serial number as display value for the asset table. But the problem is in the suggested spare part field are somethimes are asset which dont have seril number and than is the display field empty. How can I change the fields dispaly value for example to the display_value field on the case form for this requirement?
Thanks for your help.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-19-2023 06:10 AM
Hi @JohnDF
You can refer the below link...
There in one of the reply i have provided the same solution
ServiceNow Developer
I know one thing, and that is that I know nothing.
- Socrates
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-19-2023 02:53 AM
Hi @JohnDF
If my understanding is correct , you have one reference field on form which refering the same table.
If this is the case then , you can't have two display value at a time.
If possible you can create one new field on form and onChange of "suggested spair part" you can display value in new field.
ServiceNow Developer
I know one thing, and that is that I know nothing.
- Socrates
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-19-2023 05:57 AM
@Vishal Birajdar thanks for reply,
how can I achieve this? Can you assist me with code? onChange of the field "suggested spair part" the selected record should show for exampl the field from asset table dispaly_value.
Thanks for your help.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-19-2023 06:08 AM
Hi @JohnDF
I think you can get field on form by dot walking.If this works for you then no need to write script as well.
Step 1: Open form and by right clicking select configure >> form layout
Step 2: Select "suggested spair part" , you will get the (+) icon in the middle of picker
Step 3: Select the (+) icon and left side you will get the all the field
Step 4: Select the field you want to get on form and get it on right side.
Step 5: on right side get that field below "suggested spair part".
Save the changes...
Now whenever you select spair part the field on form , the field you just got will get populated automatically.
ServiceNow Developer
I know one thing, and that is that I know nothing.
- Socrates
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-19-2023 06:10 AM
Hi @JohnDF
You can refer the below link...
There in one of the reply i have provided the same solution
ServiceNow Developer
I know one thing, and that is that I know nothing.
- Socrates