Sort the columns of a power table using scripting

is it possible to sort the columns of a power table using scripting?
thanks you

Do you want to apply the sort in a way that the user can add/remove?

Or do you just want to pre-sort the data, in which case all you need is to invoke system.dataset.sort or the sortDataset expression function: sortDataset - Ignition User Manual 8.1 - Ignition Documentation

thanks for the answer Paul. I am trying to sort the order of the columns, not the rows,
I can do it manually by dragging with the mouse, but I have a table whose data is associated with a chart data, said data when updated the order of the columns is reset, and I am looking for some way to do it with scripting

Despite the name, I think system.dataset.filterColumns would work for this? If you supply all your column names, but in the correct order, they should be returned in that same order.

I do wonder whether it would be easier to rearrange the columns upstream in wherever you’re retrieving this information from, but this should certainly work.