Skip to main content

How to return internal field columns from SharePoint API query

 6

The query /_api/lists/getbytitle('<list title>')/items?$select=* returns list items for visible fields only (SP.Field.hidden property is set to false).

To be more precise the expression $select=* returns:

  • visible fields values (query that returns visible field names: /_api/Web/Lists/getByTitle('<list title>')/fields?$select=InternalName&$filter=Hidden eq false)
  • FileSystemObjectType hidden field value
  • not all visible field values are returned, for example ItemChildCount is not available:

How to return an additional fields

In order to return an additional fields, the field name(s) have to be specified explicitly using $select query option. For example, to return hidden system field FileRef you could utilize the following query:

/_api/Web/Lists/getByTitle('<list title>')/items?$select=FileRef

or

/_api/Web/Lists/getByTitle('<list title>')/items?$select=FileRef,*

Comments

Popular posts from this blog

Get Sum of Columns in a SharePoint list (Threshold edition)

It is a known fact that once the treshold limit is reached in SP, everything seems frozen.  At this point you have some options. Increase the limit using powershell or from the Central Admin OR Index the columns that you will like to operate on and create views based on those. However programmatically if you want to sum a list that has reached its threshold.  You can do so in batches as hown below:          protected   void  GetSummary( out   long  ideas,  out   long  votes,  out   long  comments,  out   long  transform)         {              long  ideasum = 0;              long columntoSum = 0;              long  commentS...

Add Web Visual Studio templates to SharePoint Project

Would you like to add the web user control to SharePoint 2007 project development.  Then open the project file with notepad and add {349c5851-65df-11da-9384-00065b846f21} to the ProjectTypeGUIDs node.   The necessary change is shown below: < ProjectTypeGuids > {349c5851-65df-11da-9384-00065b846f21};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} </ ProjectTypeGuids >