I want to create a temporary table and display it in a tablebox or subform. Is there a way to attach a tablebox or a subform to a record variable that is marked as temporary? Thanks
Hi, I just did some researches for your problem. There is not a way that you can display a temporary table in a tablebox or subform, and you then declare it as a record variable. The table must be a real table. You might want to take a look at the subform properties on the Sales Order or some other forms that have subforms, and you will know.
Yes you can display it into a TableBox 1/ Declare YourTableBufferTmp (set the temporary property to yes) 2/ Fill your temporary table with some data : YourTableBufferTmp.PrimaryKey := 'C005'; YourTableBufferTmp.Description := 'Just a Test'; YourTableBufferTmp.INSERT(TRUE); COMMIT;
3/ Run your form and pass your Temporary table as a parameter : FORM.RUNMODAL(YourRepordID, YourTableBufferTmp);
You can’t use a temporary table direcly as source table, but you can define a window with another table as source table (for example the integer table) and get and display the records of your temporary table in this form. This needs a bit of coding in the OnFindRecord and the OnNextRecord sections of the form. Look at form 344 Navigate, it uses a similar method.