Order List Using Caml Query in a text field as a number on SP 2010
-
07-02-2021 - |
Domanda
How can I order a Column where the type is text, but all the values stored are numeric,
I want to order it descending but considering the Column a Numeric field without changing the column type
Thank you
Soluzione 2
So This was my solution :
I created a Calculated column based on the original column with output type as numeric
There was a problem though. the calculated column at the beginning was returning the result as text too.
To fix this issue I had to do the following :
1.- ad a +"0" to the formula
I don't know how or why this worked, but doing this it transformed all the items into numeric.
Altri suggerimenti
There is no way to do this using CAML.
You'd need to fetch the results then sort using JavaScript.
Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a sharepoint.stackexchange