Saturday, March 5, 2011

CAML Query: FieldRef Element

The CAML  FieldRef contains DisplayName and Name respectively.

DisplayName refers to the name shows in the browser.


Name refers to the internal name which cannot be changed once you create it. If you do not modify it before, Display and Name are the same. 

On the other hand, if you modify it, you can find the Name through the link shown in the browser.First, you can click the column that you want to know its Name. Then, you will discover that the link shown in the browser have changed. 


In the above picture, the value of SortField equals the Name of the column.
In the CAML Query, it uses Name to search items only. Therefore, do not use DisplayName to do a query.



No comments:

Post a Comment