Is there a way to clear the contents of a table without having to refresh the entire form? I was thinking that calling #COM_OWNER.SetTable again would rebuild the table. Ideally this would be something like #COM_OWNER.ClearTable Name('Table').
Currently, the only way I can achieve this is to specify #COM_OWNER.IsNewForm = True, which however clears the contents of any textbox on the form.
Thanks!
Clearing contents of a table (RDMLX)
-
Paul
Re: Clearing contents of a table (RDMLX)
Thanks for posting this Tom. The way to clear a table using current beta versions would be to set the Row property to null. The Row property is not directly exposed in the LRNG_FORM ancestor but it can be accessed. Please try the following;
There will be an RDMLX method or feature of Tables to do this in the future.
Note this post is for RDMLX LongRange Form views only.
Code: Select all
#COM_OWNER.Set_Null Property('/Form.Fields.Table1.ROW')Note this post is for RDMLX LongRange Form views only.
-
Paul
Re: Clearing contents of a table (RDMLX)
I should add that 'Table1' will be replaced with the actual name of your table.
Re: Clearing contents of a table (RDMLX)
Thanks Paul. I used the Set method to set the ROW property to *NULL since there is no Set_Null. Works perfect.
Code: Select all
#COM_OWNER.Set Property('/Form.Fields.Table1.ROW') To(*NULL)-
Paul
Re: Clearing contents of a table (RDMLX)
A new parameter, ClearRows, was added to the LongRange LANSA GA release. Set this parameter to True to clear all existing rows from a table before adding new ones.
For example;
For example;
Code: Select all
#COM_OWNER.Set_Table Name('/Form.Fields.Table1') Clearrows(True)