I created a view that essentially functions the same way as the database query browser that I would be able to use from any of the computers that access the project on the shop floor. However, some of the values are coming over formatted in a way that's unusable/unreadable. I know I can specifically format the columns if the table was designated to one specific query and set of data by defining the columns, but how would you go about doing that when the query and results are dynamic?
For example, DATETIMEs come up as UNIX milliseconds. That's virtually impossible to understand without the right format.
(For Context: We use MySQL. And in the button that runs the script to query out of the database, it writes the results to a view.custom which is then bound to the data of the table)
You have to dynamically generate the .columns property when you dynamically generate .data. Specify the render property to date where appropriate. You would generally use a custom property to take the dataset format, so you can discover the column types. (Lost if you use JSON return format.)
FWIW, I would use my Integration Toolkit to make expression bindings. Some inspiration here, perhaps: