Skip to main content
Jun 28, 2023 7:36 PM UTC
Solved

CustomTableBuilder WTArrayList(QueryResult) custom columns ?

When creating a CustomTableBuilder with "return new WTArrayList(PersistenceHelper.manager.find((StatementSpec) querySpec)" for the OOTB Default tables, am I able to add custom columns and how?

 

The question aims to the return value not the TableConfig and ColumnConfig, but rather how to fill the columns.

 

 

 

Jun 30, 2023 5:51 AM UTC

Hi @phoffmann 

There are many resources about data utility. 

https://www.ptc.com/en/support/article/CS360977

PetrH

5 replies

Jun 29, 2023 6:36 AM UTC

Hi @phoffmann 

 

What custom Colum means? All columns are managed in a TableConfig and the value is shown by DataUtility. . 

The return statement returns the objects from the system and that objects are shown in the table. There is no necessary to think about custom column.

 

PetrH

phoffmannAuthor
Jun 29, 2023 11:20 AM UTC

Hi @HelesicPetr 

thank you very much for the response.
Using the QuerySpec to find Objects and display them in the table is working fine.
I like to add a custom Column (String) for an additional Information regarding the object.

When the table is rendered a validation is done and I would like to add the result of the validation for each Object in a custom column as String.

Jun 29, 2023 11:41 AM UTC

Hi @phoffmann 

I understand, so you need to add the column parameter in the TableConfig  and set your own data utility that will care about the value.

So if the validation result is saved in database you will just read it from DB for each row. If is not saved in DB, you will need to validate it for each row in the datautility 

 

There is another way to save the results in a request in commandBean, but it does not work for every situations.

 

PetrH