How to query request item variables

chrish5
Giga Guru

I have a catalog that allows our employees to check out a USB storage device from the service desk.  The form is pretty simple with a Requested For, Checkout Date and Expected Check in Date variables. There is also an Actual Check in Date variable that is hidden on the form from the requester and a Device Password workflow variable that is passed into the task that is assigned to the service desk..  When the employee submits the request, the service desk is assigned the task.  The service desk will then enter the Device Password and close the task.  The workflow takes that password and sends it to the employee and the request is closed out.  When the USB device is eventually returned to the service desk, the service desk will update the closed request by populating the Actual Check in Date.  

Here is what I need some help with.  Once a month we would like to query these USB Storage requests and if the Expected Check in Date has passed AND the Actual Check in Date is blank, we want to email the employee to let them know they have not turned in the USB Device.  Can this be done and if so how?  I don’t think we could query the sc_req_item table since the two variables do not reside there.  Could we query the sc_item_option_mtom table?  Open to suggestions.  Thanks,

6 REPLIES 6

erik_brostrom
Mega Guru

Couldn't you just go against the current.variables.<field_name>?

prasad48
Tera Guru

It may help you

 

https://www.youtube.com/watch?v=6Qn8hUuz4Vs&feature=youtu.be

Prasadkod,

Though this isn't what I'm trying to accomplish, I do what to thank you for pointing out a better way to report on RITM variables.  Up to this point I had been reporting from the sys_item_option_mtom table, which gives a row for every variable.  The video link you sent shows a much better way to report on variables. 

 

Thanks!

Chris

Rajesh Mushke
Mega Sage
Mega Sage
Hey Chrish, Just try to fetch the variable Like object.variables.vaariable_name For example: current.variables.requested_for Let me know if you need more help. Thanks, Rajashekhar Mushke Community Leader-18


Thanks,
Rajashekhar Mushke
Rising star : 2022 - 2024
Community Leader -2018
Connect me on LinkedIn : Rajashekhar Mushke