I am able to pull the date from URL if 'https://dart.service-now.com/api/now/ta ... _value=all' using Hierarchical stage.
Now the requirement is to get previous day data from the url
"https://dart.service-now.com/api/now/ta ... 2017-08-01[/b]^ORDERBYsys_updated_on&sysparm_display_value=all"
If today is 22nd August, I need to pull 21st August data.( Rule is Sysdate -1)
How to store the current date in job parameter. Please let me know
Get data from URL based sysdate-1
Moderators: chulett, rschirm, roy
Thanks for your response,Craig.
Yes , sequencer is involved to run the job.
As I am giving the url 'https://dart.service-now.com/api/now/ta ... d_on%3E=[b] 2017-08-01 [/b]^ORDERBYsys_updated_on&sysparm_display_value=all" in the Hierarchical stage -->EditAssembly-->REST step--> General-->URL, I want to pass the 'sysdate -1' as a parameter in the job.
Can we set the (sysdate-1) in the job parameter for the job or we need to do only using User variable activity in sequencer. Please let me know.
Yes , sequencer is involved to run the job.
As I am giving the url 'https://dart.service-now.com/api/now/ta ... d_on%3E=[b] 2017-08-01 [/b]^ORDERBYsys_updated_on&sysparm_display_value=all" in the Hierarchical stage -->EditAssembly-->REST step--> General-->URL, I want to pass the 'sysdate -1' as a parameter in the job.
Can we set the (sysdate-1) in the job parameter for the job or we need to do only using User variable activity in sequencer. Please let me know.
Suja
If you are asking if you can set something in the parameter's value to automatically set itself to "sysdate-1" the answer is no. There are different ways off the top of my head to get that date and yes, the User Variables stage would probably be the most "proper" place to do it. Technically an Execute Command stage could do something at the O/S level to pass back that date for the Execute Job stage or if you feel like writing a custom routine, you could leverage a Routine Activity stage. The Sequence job could then pass the output of either directly to that job parameter before it launches the job.
Another way would be to use a parameter set leveraging a value file where you write yesterday's date to the file (using your tool of choice) and then it gets automatically consumed by the job.
Another way would be to use a parameter set leveraging a value file where you write yesterday's date to the file (using your tool of choice) and then it gets automatically consumed by the job.
-craig
"You can never have too many knives" -- Logan Nine Fingers
"You can never have too many knives" -- Logan Nine Fingers
To add to this, the system variable @DATE gives you the date that the job started in internal format. You could then use OConv to convert it to "external" format, a string in whatever shape you need it to be after you subtract one from it.
Last edited by chulett on Tue Aug 22, 2017 3:00 pm, edited 1 time in total.
-craig
"You can never have too many knives" -- Logan Nine Fingers
"You can never have too many knives" -- Logan Nine Fingers