- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-28-2022 10:24 AM
I'm new to ServiceNow and assisting automation process. I can access catalog task information using SC_Task API end point but seems like Variables are store somewhere else. If I have a TASK000001 and need to retrieve value assigned to variable "X". How can I do that? Is there a table that links to Variables -> Values?
Solved! Go to Solution.
- Labels:
-
Scripting and Coding

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-28-2022 06:48 PM
Hi,
It works in the REST API Explorer, you just have to use:
variables.field_name
Example of setup (you can use sc_task table as well, as mentioned above):
And on RITM itself:
Please mark reply as Helpful/Correct, if applicable. Thanks!
Please consider marking my reply as Helpful and/or Accept Solution, if applicable. Thanks!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-13-2023 03:06 PM
Hola, disculpa estoy intentando insertar variables a un query, los datos son
Variable formulario | Sys id |
Tipo de Factura: | 86b0bdc3477f5150ccb0e8d3636d4324 |
No. Órden de Compra: | e02637844798e190ccb0e8d3636d430e |
LÃnea(s) a asociar: | b014de6c47506590ccb0e8d3636d432f |
Método de pago: | 6741b621db78e91064a12cdcd3961955 |
sin embargo no se como realizar la consulta.
un query que estoy usando es
"state=10&variables.xxxxxxx=Tarea 1 - xxxxxxx&variables.86b0bdc3477f5150ccb0e8d3636d4324=Proveedor Nacional&sysparm_display_value=true" este me trae información pero los campos que requiero no los consigo.
por favor su ayuda.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-29-2022 08:15 AM
Thank you, that worked, I just learned about the sysparm_field to get the additional field that's not in the normal API call against that table.