문제

I have column name OrderBy of Type Number:

enter image description here

I am using below CAML Query:

"<View><Query><OrderBy><FieldRef Name='OrderBy'  Ascending='TRUE' /> 
</OrderBy></Query></View>";

In OrderBy Column I have following values:

  • 2
  • 2.1
  • 2.5
  • 2.9
  • 2.10

So Expected result should be in following order:

  • 2
  • 2.5
  • 2.9
  • 2.10

But Actual result is

  • 2
  • 2.10
  • 2.1
  • 2.5
  • 2.9

So my CAML query is not working as expected, please help.

올바른 솔루션이 없습니다

다른 팁

Two Options!

  1. the function works properly but uses some strange string sorting on decimal values
  2. the function is not running at all, because the name in your FieldRef is propable wrong. I have something in mind that 'space' in Fieldnames ist masked as '_x0020_'. So maybe it works better with

    FieldRef Name='Order_x0020_By'

[ inofficial option 3: I'm wrong with everything I wrote ;-) ]

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 sharepoint.stackexchange
scroll top