How to compare 2 variables in reports to generate output end date is after start date.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-27-2018 06:15 AM
Hi,
I need a report to display requests for which end date is after start date for one of the catalog item, where start date and End date is variable column. I tried to create a report, But i am unable to compare with 2 different variables. Is there any way to work on this.
- Labels:
-
Reporting
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-27-2018 08:28 AM
I think you may be stuck on this one. If the method you're using doesn't work, then the only way to directly compare one to the other in a report would probably be to drop it into a field, but that means adding a pair of fields to sc_req_item that may only apply to a very small number of requests.
Maybe a better alternative, you can create a new variable in the catalog item itself, and set it true or false (or calculate the time difference) at time of submission. Then instead of doing the compare in the report, you just look for "variable Start before End = True".
By the same token, if this is just a sanity check, you can use a catalog client script that runs at Submit (or onChange for End) and prevents submitting if End < Begin, then you don't have to run the report at all, you'll ensure they're submitting good requests before it ever hits the work queue.
Hopefully this helps!