REST API results and Servicenow View results not matching, seems that sysparm_display_value is limiting records.

Raghu50
Kilo Contributor

Hi,

I am trying to use the REST API to get all requested items of a particular catalog item, no other filter condition, however when I use the query like below, which contains sysparm_display_value=true, it seems to be limiting the records, sometimes if remove some of the sys_parm_fields, it is bringing all records. Basically i see different number of records when i use sysparm_display_value=true and sysparm_display_value=false or sysparm_display_value=all.

Is this a bug? or is there something missing in the query?

 

https://foo.service-now.com/api/now/table/sc_req_item?sysparm_query=cat_item%3Da812c491db022300994ca08a489619c2&sysparm_display_value=true&sysparm_fields=number%2Csys_created_on%2Cshort_description%2Cpriority%2Cstate%2Cassignment_group%2Cassigned_to%2Csys_created_on%2Csys_created_by2CState%2Cvariables.c3de14f6db922300994ca08a489619c2%2Cvariables.5a20603adb922300994ca08a489619ad%2Cvariables.9005147edb522300994ca08a48961902%2Cvariables.08579739db022300994ca08a489619e9%2Cvariables.27675b39db022300994ca08a4896191c%2Cvariables.4a165872db922300994ca08a4896190a%2Cvariables.5e879b39db022300994ca08a489619a7%2Cvariables.23561c72db922300994ca08a489619c2%2Cvariables.b9299eecdb2e2300994ca08a48961981%2Cvariables.76595220db6e2300994ca08a4896195a%2Cvariables.db46643edb922300994ca08a4896191a%2Cvariables.5afb5e60db6e2300994ca08a489619c1%2Cvariables.0c2998f2db922300994ca08a48961991%2Cvariables.77c19417db622300994ca08a48961978%2Cvariables.4699189bdb622300994ca08a4896197e%2Cvariables.6b7a10dbdb622300994ca08a489619f2

 

Thanks and Regards,
Raghu

 

 

 

10 REPLIES 10

Ankur Bawiskar
Tera Patron

Hi Raghu,

I believe since you are using sysparm_display_value=true it gives you display value and doesn't give the sys_id.

Is this happening for all the table?

Mark Correct if this solves your issue and also mark Helpful if you find my response worthy based on the impact.
Thanks
Ankur

Hi @Ankur Bawiskar 

How can we fix this issue? 

Raghu50
Kilo Contributor

Hi Ankur,

You are right sysparm_display_value=true may not give the sys_id of the field but the display value, however why is it filtering out the records?

 

Thanks,

Raghu

Hi Raghu,

how many records shown with sysparm_display_value as true and with false?

Mark Correct if this solves your issue and also mark Helpful if you find my response worthy based on the impact.
Thanks
Ankur