Maximo Open Forum

 View Only
  • 1.  Start Center portlet , data disappeared

    Posted 12-30-2021 12:11
    here is the query , the query no longer will pull information , is there something missing on this or how do make another one 

    the portlet allows the end user to see what has been issued to him or her , this portlet is on the template that is used company wide. 


    ((woclass = 'WORKORDER' or woclass = 'ACTIVITY') and upper(reportedby) like '%:&USER&%' and historyflag = 0 and istask = 0)
    #Administration
    #HSE/OilandGas

    ------------------------------
    Vincente Orosco

    ------------------------------


  • 2.  RE: Start Center portlet , data disappeared

    Maximo Certified
    Posted 12-30-2021 16:36
    Vincente,

    It looks like syntax.

    ((woclass = 'WORKORDER' or woclass = 'ACTIVITY') and upper(reportedby) like :USER and historyflag = 0 and istask = 0) 

    seems to translate well. The ' and % are not normally needed, so the only real issue is having the user and person codes to be the same. 

    The executed query becomes:

    ((woclass = 'WORKORDER' or woclass = 'ACTIVITY') and upper(reportedby) like 'MAXADMIN' and historyflag = 0 and istask = 0)

    if you run as MAXADMIN, as an example.

    The general rule when using substitution variable for user would be:

    related to the current user being the person assigned as lead (replace 'lead' below with reportedby, supervisor, owner, etc., as needed)
    …lead = (select personid from person where personid = (select personid from maxuser where userid = :USER ))

    This will handle situations when the user id and person id are different.

    ------------------------------
    Christopher Winston
    Projetech Inc.
    ------------------------------