help needed for api call

chercm
Mega Sage

hi 

 

i have a field called u_imapcted_asset but when i put into the Rest API i am not getting any result . not understanding why

 

image.png

 

image.png

14 REPLIES 14

@Anand Kumar P  @Sohail Khilji @Runjay Patel  i am trying to use API to pull all the ticket for this machine but if it is using sysid , how can i script it then ?

Hi @chercm ,

 

To get the result you need to pass either sys_id or name. if name you wanna pass then use u_impacted_asset.nameLIKExyz.

 

-------------------------------------------------------------------------

If you found my response helpful, please consider selecting "Accept as Solution" and marking it as "Helpful." This not only supports me but also benefits the community.


Regards
Runjay Patel - ServiceNow Solution Architect
YouTube: https://www.youtube.com/@RunjayP
LinkedIn: https://www.linkedin.com/in/runjay

-------------------------------------------------------------------------

@Runjay Patel  i tried  :u_imapcted_asset.serial_numberLIKEjmtt0f3 and  u_imapcted_asset.asset_tagLIKEjmtt0f3 , it is not pulling out the correct detail 

Hi @chercm ,

 

Yes, List type filed will not allow to do dot walking.

Do below.

If based one tag and serial number you want o get the result then first you have to get the sysid of your impacted asset. Do gliderecord to get the sys id first and then pass it query parameter.

 

-------------------------------------------------------------------------

If you found my response helpful, please consider selecting "Accept as Solution" and marking it as "Helpful." This not only supports me but also benefits the community.


Regards
Runjay Patel - ServiceNow Solution Architect
YouTube: https://www.youtube.com/@RunjayP
LinkedIn: https://www.linkedin.com/in/runjay

-------------------------------------------------------------------------

@Runjay Patel  any examples how to do this ?