Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

How to filter data by field description using servcienow api

Phanikanth
Kilo Contributor

Hi Team,

I have an api which will return short_desc and description  and want to filter short_desc and description based on requested for.

Example:  https://test.service-now.com/api/now/table/sc_task?sysparm_limit=1&sysparm_display_value=true&sysparm_query=short_descriptionLIKESHOP&sysparm_query=descriptionLIKESelina.

I'm not able to fetch the Requested for field through SC task servicenow api.

find_real_file.png

find_real_file.png

1 REPLY 1

Ankur Bawiskar
Tera Patron
Tera Patron

Hi,

requested_for is not on sc_task

it's on sc_request

so use this to fetch request.requested_for

you can give comma separated fields which you want in response

https://test.service-now.com/api/now/table/sc_task?sysparm_limit=1&sysparm_field=request.requested_for&sysparm_display_value=true&sysparm_query=short_descriptionLIKESHOP&sysparm_query=descriptionLIKESelina.

Regards
Ankur

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