I have added a Temp table as a data source to my All production orders list page. I have put a method call in the ProdListPageInteraction/Intitializing method to fill up the temp table in a separate static method call of another class.But in the line of code TempDS.setTempData(fillTempdata method call) it says TempDS variable hasn’t been declared. Is there a way or a parameter that I need to set up to be able to use the TempDS in the list page interaction class?
What if you get the buffer by calling this.listPage().activeRecord(queryDataSourceStr(AQuery, aTable)) and then use this buffer to insert a record?
I have tried the above as below
tempTableBuffer = this.listPage().activeRecord(queryDataSourceStr(ProdTableListPage, TampTable))
after executing the above two lines of code the TempTableBuffer has no records in it. However, when I did a select count(recid) from the tempTable in the filltempTableBuffer() the temp table has records in it.
So, instead I have tried the below. The tempTableBuffer is of TempDB type table.
after executing the above line and do a select count(recid) from tempTableBuffer I do see that there are same number of records. However, I don’t see the data after it renders the all production orders screen.
It seems like the tempTableBuffer table is somehow being treated or associated as the Form data source. Am I missing something in order to assign the tempTableBuffer to the form temptable datasource?
setTempData() indeed can’t be used with TempDB tables; it’s used with InMemory tables.
If the buffer is populated with data but nothing is shown in the form, then the problem seems to be in how you’re using the data source in the form. First of all, review ranges and dynamic links used by the query.
If you want to test whether it’s related to the temporary data set or not, you can temporarily change the table type to Regular, put a few records to the table, disable the logic around linkPhysicalTableInstance() and run the form.