Search This Blog

Monday, October 21, 2013

Creating SQL queries, escalations, and notifications for work records


  1. In the Work View application, select Advanced Search > Where Clause and copy one of the code samples to the Current Query area.
  2. Name the query and make it public.
  3. Save the record.
Sample queries
SQL WHERE clause to list Priority 1 work view records that are open and do not have log data entered in the previous sixty minutes
((((exists (select recordkey from worklog where workview.recordkey = worklog.recordkey and workview.class=worklog.class and (worklog.createdate < sysdate - 60/1440)) or not exists (select recordkey from worklog where workview.recordkey = worklog.recordkey and workview.class=worklog.class )and ((status != 'CLOSE')))) and ((status != 'RESOLVED'))) and ((status != 'COMP'))) and ((priority = 1))
SQL WHERE clause to list Priority 2 work view records that are open and do not have log data entered in the previous four hours
((((exists (select recordkey from worklog where workview.recordkey = worklog.recordkey and workview.class=worklog.class and (worklog.createdate < sysdate - 240/1440)) or not exists (select recordkey from worklog where workview.recordkey = worklog.recordkey and workview.class=worklog.class )and ((status != 'CLOSE')))) and ((status != 'RESOLVED'))) and ((status != 'COMP'))) and ((priority = 2))

No comments:

Post a Comment

Default Communication Template for each application - Maximo

  Add the dialog from Library to the SR and WOTRACK application. So, the application xml overwrites the Library xml. Now the SR is using the...