Skip to content
← Back to activity

Immutable solution version

Retrieving text State from ServiceNow REST API

Version 1Sign in to save

Complete solution

What you're looking for is a display value.

[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" }

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. 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

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 1 · 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>