Maximo Open Forum

 View Only
  • 1.  Conditionally hiding field in Maximo Mobile

    Posted 18 days ago
    Hi All,
    I have added a new field called observation in the Activities And Tasks page.
     
    The new requirement is that if the below field measurement point will have any value then the observation field value should be hidden.
     
    I wrote the below code but with this some issue is happening.
     
    Anything wrong with the code.
     

    #Mobility

    ------------------------------
    Souvik Dutta
    TCS
    ------------------------------


  • 2.  RE: Conditionally hiding field in Maximo Mobile

    Posted 18 days ago

    When something is null in the database, it won't exist in the JSON response we get from Maximo because it's set to drop nulls. In that scenario it is actually undefined. You typically want to use {!ds.item.field} to indicate that the field doesn't exist (could be null, undefined, etc.) or {ds.item.field} to indicate that it does exist. 

    You also don't want to check the woPlanTaskDetaildsSelected datasource because that is a JSON datasource that will have 1 and only 1 task loaded into it and it seems like you're trying to display observation in the data-list. You should just be using item.pointnum. Since you want to hide it when the pointnum exists (is something other than undefined, null, etc.), you should have hidden="{item.pointnum}".



    ------------------------------
    Steven Shull
    IBM
    ------------------------------