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
------------------------------
Original Message:
Sent: Sat June 03, 2023 04:56 AM
From: mohammad moula
Subject: auto-display the data in table control from the object data source
Hello,
I have a question regarding the Table Control in application designer.
1) Following picture showing some attribute and a table control .
------------------------------
mohammad moula
------------------------------
#MaximoIntegrationandScripting
#Maximo