Maximo

 View Only
  • 1.  Maximo Mobile 8.8 data-list

    Posted Mon January 30, 2023 02:43 PM
    Hello,

    I have a page that is using a data-list to display some records that are related to a work order. I added a button in the data list so each row has its own Edit button that opens up a sliding drawer. The drawer opens and I can edit and save the record but the problem is that it is always editing the first row in the data-list even if I'm clicking on the Edit button in row 3 for instance.

    How do you pass a value of that unique row in the data list to the sliding drawer? I have been experimenting with on-click-arg on my button but its not working.

    ------------------------------
    stephen lemaster
    ------------------------------

    #AssetandFacilitiesManagement
    #Maximo


  • 2.  RE: Maximo Mobile 8.8 data-list

    IBM Champion
    Posted Mon February 06, 2023 06:19 AM
    Hi Stephen,

    on-click-arg is the good way to pass the info.
    If it's not working, try to log the value to see if you pass the right parameter.

    Also, feel free to share your code so we can have a look on it

    ------------------------------
    Quentin Despeisse
    Maximo Sales Specialist
    Atos
    Aix En Provence
    ------------------------------



  • 3.  RE: Maximo Mobile 8.8 data-list

    IBM Champion
    Posted Mon February 13, 2023 10:12 PM

    Hi Stephen,

    If you are using a custom controller, you can use the functions dialogInitialized and dialogOpened to get the parent datasource, which will be your data list datasource. Otherwise, if you are using the AppCustomization file, you can still use both functions but you will need to filter by your dialog name.

    For AppCustomization.js you can use as bellow:

    dialogInitialized(dialog){
       if (dialog.name == "MyDialog") { ... }
    }
    
    dialogOpened(obj){
        if (obj.dialog.name == "MyDialog"){ ... }
    }


    ------------------------------
    Maycon Belfort
    Consultant
    Maxinst Consultoria e Tecnologia LTDA
    Belo Horizonte
    Brazil
    ------------------------------



  • 4.  RE: Maximo Mobile 8.8 data-list

    IBM Champion
    Posted Tue February 14, 2023 01:20 AM

    Hi,

    You need to pass the right data item to the slider drawer.

    The edit button should call a method in App customization js which will pick the event.item and pass it as item for the drawer fields.

    Check the implementation of oob drawers like meter reading update.



    ------------------------------
    Biplab Choudhury
    IBM Champion 2022
    Senior Consultant
    BPD Zenith
    Melbourne
    ------------------------------