Maximo Integration

 View Only
  • 1.  Possible to Filter Lookup based on another field's value in the Advanced Search Dialog Box using Automation Script?

    Posted Tue August 24, 2021 06:07 PM
    With an automation script in the Advanced Search dialog box, is it possible to filter a field's lookup list based on the value of another field on the screen?  In the advanced search dialog box, say a user enters "SITE1" for the SITEID, then they click on the Location lookup list. Is it possible to only show the locations for SITE1?  Since it's a zombie MBO the traditional TABLE domain doesn't work.

    ------------------------------
    H Alexander
    ------------------------------


  • 2.  RE: Possible to Filter Lookup based on another field's value in the Advanced Search Dialog Box using Automation Script?

    Posted Wed August 25, 2021 08:20 AM
    I'm going to start with a caveat that unless you're dealing with a custom field, I probably would never do this. In your case since you're trying to filter location I wouldn't do this. That being said, I came up with a solution that would work if you use the Retrieve List launch point on the attribute (scroll down below where I said it wasn't possible :)). 

    https://community.ibm.com/community/user/iot/communities/community-home/digestviewer/viewthread?GroupId=727&MessageKey=78682d96-daec-47a9-b757-5c2cf7d49bca&CommunityKey=3d7261ae-48f7-481d-b675-a40eb407e0fd&tab=digestviewer


    ------------------------------
    Steven Shull
    ------------------------------



  • 3.  RE: Possible to Filter Lookup based on another field's value in the Advanced Search Dialog Box using Automation Script?

    Posted Wed August 25, 2021 03:15 PM
    It was on a custom field, so we are good.  That code worked perfectly.  Thanks so much, Steven!

    ------------------------------
    Hollie Alexander
    ------------------------------



  • 4.  RE: Possible to Filter Lookup based on another field's value in the Advanced Search Dialog Box using Automation Script?

    Posted Fri March 18, 2022 05:03 PM
    Hi Steven,
    So if we select a value in a custom field, e.g. "Business Unit" then, can the list of out-of-the-box Location and Asset fields be filtered and also applied to the drilldown shown for these fields?

    Regards

    ------------------------------
    mx pro
    ON
    ------------------------------



  • 5.  RE: Possible to Filter Lookup based on another field's value in the Advanced Search Dialog Box using Automation Script?

    Posted Fri March 18, 2022 09:47 PM
    I'll start with your specific question about drilldowns and the answer is no. Drilldown is a special control and doesn't utilize the functionality on the attribute to populate the list. Even if you filtered the list it would not impact the drilldown. 

    I also wanted to reiterate you have to put the Retrieve List automation script on the fields you want filtered. If your custom business unit field is filtered by the out of the box location field (IE I pick a location and then I pick a business unit), then there's no problem because you're filtering your custom field.  You're saying you want to do the reverse (IE I pick a business unit and then locations are filtered based on the business unit) which I would never do even if it would work. 

    The thing to understand about utilizing a Retrieve List automation script is you're replacing some of the logic in the java code with your own custom code. For example, if the getList only allows you to pick locations in an OPERATING status and you tie a Retrieve List automation script with different logic you might be able to pick a location in a NOT READY status. The problem might be caught elsewhere in the code (such as the validate() method on the attribute or appValidate() on the MBO) but that won't always be the case. I would not utilize this on out of the box attributes for that reason.

    ------------------------------
    Steven Shull
    ------------------------------