Maximo Open Forum

 View Only
  • 1.  How to use two attributes in a single search field in Maximo advance search

    Posted 04-08-2021 10:03
    Dear All,
    Is it possible to search a field with multiple attributes in Maximo advance search?
    #Customizations

    ------------------------------
    Pradeep Rout
    TCSL
    ------------------------------


  • 2.  RE: How to use two attributes in a single search field in Maximo advance search

    Posted 04-08-2021 10:05
    Are you trying for example to search for work orders that are approved or in progress? 

    =APPR,=INPRG

    The comma represents the OR

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



  • 3.  RE: How to use two attributes in a single search field in Maximo advance search

    Posted 04-08-2021 10:19
    Hi Christ,
    Thanks for your reply. The requirement is onItem master application users wants to filter the records from a single field and it should bring both the attribute results matching of Model and Catalog. Is this possible?

    In the above example you provided it is for a single attribute but requirement is to search for multiple attribute from a single input box from advance search.

    Regards,
    Pradeep

    ------------------------------
    Pradeep Rout
    TCSL
    ------------------------------



  • 4.  RE: How to use two attributes in a single search field in Maximo advance search

    Posted 04-08-2021 10:32
    Hi Christ,
    Thanks for your reply. The requirement is onItem master application users wants to filter the records from a single field and it should bring both the attribute results matching of Model and Catalog. Is this possible?

    In the above example you provided it is for a single attribute but requirement is to search for multiple attribute from a single input box from advance search.

    ------------------------------
    Pradeep Rout
    TCSL
    ------------------------------



  • 5.  RE: How to use two attributes in a single search field in Maximo advance search

    Posted 04-08-2021 10:37
    Edited by Steven Shull 04-08-2021 10:37
    EDIT: Sorry, I had started a response and didn't refresh where you clarified that you're trying to do what I thought. Leaving my full response.

    Can you clarify your intended scenario? I'm assuming you're looking for a user to provide a value in a generic field that generates a SQL statement like "(assetnum='VALUE' or location='VALUE')" where they only provide VALUE in your single field. Assuming that's the case I don't believe that's possible. Maximo requires persistent attributes which have to be tied to a single column.

    If you're looking to provide two values for a single attribute (IE a date range for example), that is possible but I don't think that's what you're looking to do.

    ------------------------------
    Steven Shull
    Projetech Inc.
    ------------------------------



  • 6.  RE: How to use two attributes in a single search field in Maximo advance search

    Posted 04-08-2021 10:48
    Thanks Steve. Yes the your understanding is correct.

    The requirement is  for example user wants to use the Asset column field from teh advance search option and while entering value it should enter the value as assetnum='1000' or location='200'.


    Can we bind two attributes to a  single columns or is it possible to use a conditional expression on properties tab to trigger the search action with adding OR clause to the existing binding.



    ------------------------------
    Pradeep Rout
    TCSL
    ------------------------------



  • 7.  RE: How to use two attributes in a single search field in Maximo advance search

    Posted 04-08-2021 13:33

    No, you can't have a single input tied to two attributes. I'm not entirely sure what you mean by conditional expressions in this context or how you would expect conditional UI to help but list tab/advanced search conditional UI is not really a thing as it can't evaluate the rules. 

    The only way I could see something like this being possible is to build a custom view that has a single column for your two values. You mentioned model and catalog on items for example. So you could create a view that looks like this (replacing emxcatalog & emxmodel with the actual attribute names in your environment):

    SELECT itemnum,itemsetid,emxcatalog as [modelcatalog] FROM item WHERE emxcatalog is not null
    UNION
    SELECT itemnum,itemsetid,emxmodel as [modelcatalog] FROM item WHERE emxmodel is not null

    And then build a relationship from ITEM (on itemnum=:itemnum and itemsetid=:itemsetid) to this view and display the attribute as RELATIONNAME.modelcatalog. Maximo will build an exists SQL query that looks at this view to try and see if the item exists in this custom view. 

    This would in theory work, but has the negative issue that you're no longer on the ITEM object for example. That means searching might be slower than if you were able to build the SQL on the ITEM object itself.



    ------------------------------
    Steven Shull
    Projetech Inc.
    ------------------------------



  • 8.  RE: How to use two attributes in a single search field in Maximo advance search

    Posted 01-26-2022 22:54
    Thanks Steve.

    This is something I tried but eventually I couldn't use my new view's field on Advanced Search dialog. Tried to play with DUMMY_TABLE and relationships, they also didn't work. Still looking for a solution.

    ------------------------------
    Sourabh Jain
    XXX
    ------------------------------



  • 9.  RE: How to use two attributes in a single search field in Maximo advance search

    Posted 01-27-2022 09:19
    Edited by Stephen Rievaj 01-27-2022 09:24
    Here's another idea:
    • Create a new attribute on ITEM: emxcatalog_and_emxmodel
    • Attribute is persistent
    • Search Type is WILDCARD
    • Create automation script on ITEM Add and Update
    • Populate emxcatalog_and_emxmodel with the values for the 2 corresponding, separate with a special character that wouldn't be used in those fields like ^ or ô
    • Here is the automation script: mbo.setValue('emxcatalog_and_emxmodel', mbo.getString('emxcatalog') + 'ô' + mbo.getString('emxmodel'))
    • Add this field to Advanced Search
    • Update all existing values in the database
    The one drawback I can think of is that the user can't put an equals sign at the start of search string.

    ------------------------------
    Stephen Rievaj
    MGI Maintenance Group
    ------------------------------



  • 10.  RE: How to use two attributes in a single search field in Maximo advance search

    Posted 04-09-2021 09:31
    Another thing to consider is that the JSON API has this functionality. I know this doesn't fit the use case of the Advanced Search from within the Maximo UI. But it's worth mentioning.

    You can use the "searchAttributes" query parameter to specify which fields to search, and the "oslc.searchTerms" parameter for the actual search string. This will perform an OR-style query like Steven indicated above.


    ------------------------------
    Alex Walter
    A3J Group, LLC
    ------------------------------