Maximo

 View Only
  • 1.  auto-display the data in table control from the object data source

    Posted Sat June 03, 2023 04:57 AM

    Hello,

    I have a question regarding the Table Control in application designer.

    1) Following picture showing some attribute and  a table control .

    2) now, the following automation script with action object is to load a data from ZZAMSTIMECARD table into the control table control ZZAMSTEMPSHEET as follow:
    3) The data is inserted successfully into ZZAMSTEMPSHEET which is linked with table control but the data is not displayed automatically ???
    Note: when I click on filter table and press enter on any table column then the data is displayed


    ------------------------------
    mohammad moula
    ------------------------------

    #Maximo
    #MaximoIntegrationandScripting


  • 2.  RE: auto-display the data in table control from the object data source

    Posted Mon June 05, 2023 08:52 AM

    You're not utilizing MBOs and the relationship of the table control to add records. You're executing direct SQL to insert the records which the Maximo framework will not know has occurred. Maximo would have to continuously query the database to look for changes that way.

    I can't tell how your script is firing but I'm assuming it's the pushing of the button called Display Timesheet. If so that means you have an Action launch point automation script which will have an implicit variable of mbo. Assuming your relationship in Database Configuration from this top object to ZZAMSTEMPSHEET is called the same as object name, you would need to do something like:

    tempsheetSet=mbo.getMboSet("ZZAMSTEMPSHEET")

    tempsheetSet.deleteAll()

    tempsheetMbo=tempsheetSet.add()

    tempsheetMbo.setValue("DESCRIPTION","This is my description")

    You would probably need to fetch in a separate set and loop through it to copy the values.

    But I think in your use case, because you're deleting data and reloading it all the time, this doesn't make any sense either. If this data is not going to be persisted, you should define your object as non-persistent (so it's not stored in the database and just displayed in memory in the UI) or create it as a database view instead of adding any of the overhead to the database to delete and insert the data again. 



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



  • 3.  RE: auto-display the data in table control from the object data source

    Posted Mon June 05, 2023 09:42 AM
    Thanks for clarification,  you are absolutely right. 





  • 4.  RE: auto-display the data in table control from the object data source

    Posted Wed June 07, 2023 06:09 AM
    Thanks,

    Well I thought that having temporary table for deletion and insertion will contradict with another user.

    I totally changed the philosophy to have the table control have a business object with filtering some columns and it works.

    Thanks