Trying to pull the last 30 days Changes created on a Configuration Item

htharun
Tera Contributor

Hi,

I am trying to create the report for the last 30 changes created on a Configuration Item. I tried below two options but not able to get the desired output.

 

Help me with the correct query

 

the below query is fine on the GUI Console of the Service Now. As I am trying to use it inscript which is not giving output in Postman

 

cmdb_ci=21gffg8d13d61k08c9dfc6076144d0d1^sys_created_onONLast 3 months@javascript:gs.beginningOfLast3Months()@javascript:gs.endOfLast3Months()

 

I also tried the below query

https://thomsonreuters.service-now.com/api/now/table/change_request?sysparm_query=cmdb_ci=1422275967...sys_created_onRELATIVELE@dayofweek@ago@30

 

4 REPLIES 4

Prasad Dhumal
Mega Sage
Mega Sage

Hello htharun,

https://thomsonreuters.service-now.com/api/now/table/change_request?sysparm_query=cmdb_ci=21gffg8d13d61k08c9dfc6076144d0d1^sys_created_onONLast30days@javascript:gs.daysAgoStart(30)@javascript:gs.daysAgoEnd(0)&sysparm_limit=30

Could you please try this?

Hi Prasad, it didn't work for me. I am not seeing any results. 

its not working.

htharun
Tera Contributor

Hi Prasad, No its are working. I am getting a blank result.