- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-12-2016 03:02 AM
Hi,
At present I am quering the input date with todays date .My code(Business rule) is :
var date = gs.nowDateTime();
var inv =new GlideRecord('u_hpam_inventory_control_1');
inv.addQuery('u_input_date',date);
But i want to query the input time with last 15 min whenver the business rule start..
Please help me out
Thanks in Advance !
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-12-2016 03:05 AM
inv.addEncodedQuery('sys_created_onONLast 15 minutes@javascript:gs.minutesAgoStart(15)');
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-12-2016 03:05 AM
inv.addEncodedQuery('sys_created_onONLast 15 minutes@javascript:gs.minutesAgoStart(15)');
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-12-2016 03:39 AM
Thanks Anurag

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-25-2022 12:02 PM
You can form the query in the data list, and then copy it with right click
Code: current.addEncodedQuery('tablename=incident^ORtablename=sc_request^ORtablename=sc_req_item^ORtablename=sc_task^sys_created_onONLast 15 minutes@javascript:gs.beginningOfLast15Minutes()@javascript:gs.endOfLast15Minutes()^ORsys_created_onONCurrent minute@javascript:gs.beginningOfCurrentMinute()@javascript:gs.endOfCurrentMinute()');