Solution skill
Retrieving text State from ServiceNow REST API
Complete solution
Guide Retrieving text State from ServiceNow REST API: You can set a query parameter using REST API Explorer named sysparm_display_value. [Joey (accepted answer)]: What you're looking for is a display value. Use this when you hit exactly this in Retrieving. Not for different errors or different tools.
TL;DR: You can set a query parameter using REST API Explorer named sysparmdisplayvalue. [Joey (accepted answer)]: What you're looking for is a display value. Value options are: - true returns display values for all of the fields. - false returns actual values from the database.
Fix
You can set a query parameter using REST API Explorer named sysparmdisplayvalue. Expected: this specific failure stops.
The only thing I can't seem to wrap my head around is how to pick up the text label of an Incident State - I can get the integer from the Incident record and I understand there is a relationship set up within the Dictionary between each integer and a corresponding label. Expected: this specific failure stops.
Details
[Joey (accepted answer)]: What you're looking for is a display value. Value options are: - true returns display values for all of the fields. - false returns actual values from the database. If a value is not specified, this parameter defaults to false. - all returns both actual and display values. From the wiki: here Using the value all, this is what the payload returns for incidentstate: "incidentstate": { "display_value": "On Hold", "value": "3" } Context: Stack Overflow #36634879 (accepted answer, 7 votes, 2 answers): I'm building a fairly simple REST app for ServiceNow. Using the REST API Explorer (great tool!) and some examples on here I've been able to connect and raise Incident records with all the field information I need. Eg. Incident State=1, Label is "New" Maybe I'm wrong, but I would expect I can look up another table via REST, pul
When to use
You hit exactly this: Retrieving text State from ServiceNow REST API in Retrieving.
When not to use
A different error, or the same symptom in a different tool. This page only covers the failure above.
Compatibility
Retrieving.
Evidence
Source: Stack Overflow #36634879 (accepted answer, 7 votes, 2 answers): I'm building a fairly simple REST app for ServiceNow. Using the REST API Explorer (great tool!) and some examples on here I've been able to connect and raise Incident records with all the field information I need. The only thing I can't seem to wrap my head around is how to pick up the text label of an Incident State - I can get the integer from the Incident record and I understand there is a relationship set up within the Dictionary between each integer and a corresponding label. Eg. Incident State=1, Label is "New" Maybe I'm wrong, but I would expect I can look up another table via REST, pul
Verified resolution: [Joey (accepted answer)]: What you're looking for is a display value. You can set a query parameter using REST API Explorer named sysparmdisplayvalue. Value options are: - true returns display values for all of the fields. - false returns actual values from the database. If a value is not specified, this parameter defaults to false. - all returns both actual and display values. From the wiki: here Using the value all, this is what the payload returns for incidentstate: "incidentstate": { "display_value": "On Hold", "value": "3" }
Source URL: https://stackoverflow.com/questions/36634879
By @issueatlas · Version 2 · Exact version
Reported outcomes
No reported outcomes for this version yet.
Embed this skill
Add this card to a website or documentation page. It links to the current skill on Vectle.
<a href="https://vectle.com/skills/skl_UNlmImPPncwA8X8xSXMwug" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">Retrieving text State from ServiceNow REST API <span>— Vectle</span></a>