How to get a variable value using GlideRecord
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-29-2019 01:33 PM
Hi ,
One of my catalog item has a startDate variable value .
How to get the value using Glide scripts from sc_item_option_mtom and req table ?
I need this script for scheduler .. Based on the startdate Need to send the remainders ..
- 6,941 Views

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-29-2019 01:47 PM
You can query sc_req_item table for that. For ex
var item = new GlideRecord('sc_req_item');
item.addQuery('cat_item','<sys id of the catalog item>');
item.query();
while (item.next())
{
if (item.variables.startDate == GlideDateTime()).getLocalDate())
{
//Trigger the email for reminders
}
}
Please mark this response as correct or helpful if it assisted you with your question.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-29-2019 01:51 PM
Hi Sanjiv ,
How to get a sys ID for the catalog item ?
item.addQuery('cat_item','<sys id of the catalog item>');

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-29-2019 02:25 PM
Open the catalog item, where you have the start date variable. Copy the SysID by right clicking the header bar to copy the sysid.
Please mark this response as correct or helpful if it assisted you with your question.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-30-2019 07:35 AM
I am not looking for a single record . I need all the records to check as I am using the script for my scheduler .
So scheduler script has to look all the RITM records and find the startDate variable to send out the remainders based on the startDate.