Updating field via integration not working with Display Value

Vinicius2
Kilo Sage

Hi Everyone,

 

I have an integration with LeanIX running on my instance. They want to start using a field called "Platform Host," which is a reference field. The system sends the display value to ServiceNow, and while the value is being set in the reference field, it's not properly referencing the record. Please refer to the screenshots for a clearer understanding.

Vinicius2_0-1736889394172.png

When I use SN Utils to check the value, it shows the same name as the reference record.

Vinicius2_1-1736889446180.png

Vinicius2_2-1736889490272.png

 

Does anyone know what could be causing this?

 

 
1 ACCEPTED SOLUTION

MackI
Kilo Sage

hi @Vinicius2 

 

I believe you are well and good.

 

Okay, I understand the issue. You have a LeanIX integration that's sending the display value of a referenced record (e.g., "Vehicle Update Service Platform") to populate the "Platform Host" reference field in ServiceNow. Although the display value appears in the field, the actual reference to the target record is not being established correctly.

Here's a breakdown of the likely causes and how to fix this in your ServiceNow integration:

Why this is happening

Reference fields store sys_ids: Reference fields in ServiceNow fundamentally store the sys_id (a unique 32-character identifier) of the referenced record, not the display value.

Display value is for human readability: The display value (like "Vehicle Update Service Platform") is what's shown to users, but it's not used for the internal linkage.
Integration is sending the display value instead of sys_id: Your LeanIX integration is likely sending the display value in the payload for the "Platform Host" field. ServiceNow is trying to be helpful by showing this value, but it doesn't have enough information to resolve it to the correct sys_id.

How to fix it

You need to modify your integration so that ServiceNow receives the sys_id of the referenced record from LeanIX. Here are the general approaches, with more specific steps depending on your integration method:---


1. Modify LeanIX to send the sys_id (Recommended):

Best Solution: The ideal solution is to change the LeanIX integration so that it sends the sys_id of the "Platform Host" record in the payload to ServiceNow. This is the most reliable way to establish the reference.
How:You'll need to work with your LeanIX administrator or consult the LeanIX API documentation to determine how to retrieve and include the sys_id in the integration payload.
The specific steps will depend on how your LeanIX integration is configured (e.g., custom scripts, middleware, etc.).

2. Lookup the sys_id in ServiceNow (If you cannot modify LeanIX):

How: If modifying LeanIX is not feasible, you can add a step in your ServiceNow integration logic to look up the sys_id of the referenced record based on the display value received from LeanIX.
 
For this you need a Transform Script.
 
If you like this opinion and your problem is resolved after reviewing and applying it. Please kindly mark this your best answer(Accepted Solution)🌠‌ OR  mark it  Helpful ‌‌ if you think that you get some insight from this content relevant to your problem and help me to contribute more to this community
MackI | ServiceNow Developer | 2 *Mainline Certification | LinkedIn Top IT Operation Voice 2023 | Sydney,Australia

View solution in original post

5 REPLIES 5

Community Alums
Not applicable

Hi @Vinicius2 When updating a field in ServiceNow via integration and encountering issues with the Display Value, it's typically because the integration is not correctly handling how ServiceNow expects reference fields. 

In Servicenow if you want to update the reference field then typically you need to retrieve the sys_id of the record and then update it. 

Suggested solution 

Retrieve the sys_id of the reference record before sending the update.

 

Please like/mark helpful, if my response was in line with your expectation.

 

Regards,

Gagan k

jcmings
Mega Sage

Reference fields expect a sys_id. So you'll need to script a lookup on your Platform Host table, identify the record, and pass the sys_id to set the value.

 

It will go integration --> data is returned --> script performs a GlideRecord search on Platform Host table with the display value you sent over and identifies the record -->  script sets the value on the record in question.

MackI
Kilo Sage

hi @Vinicius2 

 

I believe you are well and good.

 

Okay, I understand the issue. You have a LeanIX integration that's sending the display value of a referenced record (e.g., "Vehicle Update Service Platform") to populate the "Platform Host" reference field in ServiceNow. Although the display value appears in the field, the actual reference to the target record is not being established correctly.

Here's a breakdown of the likely causes and how to fix this in your ServiceNow integration:

Why this is happening

Reference fields store sys_ids: Reference fields in ServiceNow fundamentally store the sys_id (a unique 32-character identifier) of the referenced record, not the display value.

Display value is for human readability: The display value (like "Vehicle Update Service Platform") is what's shown to users, but it's not used for the internal linkage.
Integration is sending the display value instead of sys_id: Your LeanIX integration is likely sending the display value in the payload for the "Platform Host" field. ServiceNow is trying to be helpful by showing this value, but it doesn't have enough information to resolve it to the correct sys_id.

How to fix it

You need to modify your integration so that ServiceNow receives the sys_id of the referenced record from LeanIX. Here are the general approaches, with more specific steps depending on your integration method:---


1. Modify LeanIX to send the sys_id (Recommended):

Best Solution: The ideal solution is to change the LeanIX integration so that it sends the sys_id of the "Platform Host" record in the payload to ServiceNow. This is the most reliable way to establish the reference.
How:You'll need to work with your LeanIX administrator or consult the LeanIX API documentation to determine how to retrieve and include the sys_id in the integration payload.
The specific steps will depend on how your LeanIX integration is configured (e.g., custom scripts, middleware, etc.).

2. Lookup the sys_id in ServiceNow (If you cannot modify LeanIX):

How: If modifying LeanIX is not feasible, you can add a step in your ServiceNow integration logic to look up the sys_id of the referenced record based on the display value received from LeanIX.
 
For this you need a Transform Script.
 
If you like this opinion and your problem is resolved after reviewing and applying it. Please kindly mark this your best answer(Accepted Solution)🌠‌ OR  mark it  Helpful ‌‌ if you think that you get some insight from this content relevant to your problem and help me to contribute more to this community
MackI | ServiceNow Developer | 2 *Mainline Certification | LinkedIn Top IT Operation Voice 2023 | Sydney,Australia

Ankur Bawiskar
Tera Patron
Tera Patron

@Vinicius2 

which API are they using to push the data?

Is it a table API? import set API or scripted REST API?

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader