SharePoint: How to get Top 5 records by using CAML query from a list -


I've already created a webpage to show data from the list, but I really want to be just that top 5 Records to be shown in the list (using the CAML query).

Does anyone know how to do this? thanks a lot.

  & lt; Query & gt; & Lt; OrderBy & gt; & Lt; FieldRef name = 'id' ascending = 'False' /> & Lt; / OrderBy & gt; & Lt; / Query & gt;  

You can set the RowLimit property of your SPQuery object.

& lt; RowLimit & gt; The tag is in the schema definition of a view (the direct child of & lt; see & gt; ) and so it is & lt; Question & gt; tag.


Comments

Popular posts from this blog

python - Overriding the save method in Django ModelForm -

html - CSS autoheight, but fit content to height of div -

qt - How to prevent QAudioInput from automatically boosting the master volume to 100%? -