I am currently using Outsystems 11, and I have an advanced SQL from an external db call that is put into a table records. 

I am trying to sort a column named catalog_num that is full of integers, however the external db for whatever reason has made the column datatype varchar (string) instead of integer. Thus when I try to use the List_SortColumn widget to sort the column ({tablename}.[catalog_num]), it sorts improperly thinking it is a string rather than an integer. 

The output entity for my advanced sql has integer for the catalog_num column as the datatype, and I was wondering if it is possible for me to sort using tablerecords, but sort on the right datatype.


Hello Edward,

There are a few options you can do. You can cast the sort column: order by cast({table}.[column] as integer)

You can add zero to the column: order by {table}.[column] + 0

If you know for sure that there are only integers in the column, you can change the data type of the field in the extension in integration studio. You have to make sure of course that it has no other consequences.

Hope this helps!