Sort data in datalist

Confluence User - 11 May, 2022

We have a table with a lot of columns and I trying to add javascript to the page that display datalist to allow the users to sort the columns that they want
The problem is joget store all the column as longtext. So sometimes the sort function give wrong result
I know that I need to convert the data type but I dont know how because the columns in the order by clause is not fixed the users can choose columns that they want.
And they can insert or remove columns in the table. Because I allow them to design the form
Please help!

datalists;forms

1


12 May, 2022
confluenceUser
confluenceUser

To produce a numerical order, you can use datalist JDBC Binder and "CAST" the column to UNSIGNED, for example:

SELECT id, CAST(c_thisIsANumberField AS UNSIGNED) as Number from app_fd_myTable
RELATED QUESTIONS

Your answer


To answer a question you'll need an account.

Print