Modify Perspective table headers

Hi
I would like to change the headers of columns in a perspective table.
I would have thought that the following script would do the trick:

self.getSibling("tblTable").props.columns[0].header.title = "abc"

Can this be done? What am I missing?

Thanks

That works for me when I trigger it from a button in the same container as the table. Did you create the path using the Properties Browser button beside the script editor?
What error are you getting?

1 Like

Hi
I get no error and the table header does not change.
The value in .....props.columns[0].header.title does change to "abc" but the header of the column does not change. It remains as the value of the database column name from whence it is retrieved.
I must be writing to the wrong place to change the header??

Have you declared each of your columns.X.field properties? Make sure you put the exact column name from your database in there. Many of the column properties don't work if the data column isn't explicitly specified.

1 Like

That's it!
weird
Apparently you need to explicitly enter the 'field' attribute so that you can then edit the header.title

Thanks