Quantcast
Channel: SharePoint 2013 - Development and Programming forum
Viewing all articles
Browse latest Browse all 25064

REST and using the $select=* with the $expand options

$
0
0

Hi,

I am having some issues with constructing a REST query for returning the properties of a list. In my case, I need 'All' properties, not just the default ones. I can get this by applying the $select=* query option but I also need to retrieve the URLs of it's Forms.

The 'Forms' property of the list is a deferred property and can be retrieved by using the $expand=Forms query options...Problem is: I cannot use both of these query options in the same query. To illustrate:

This works:

https://myportal/_api/Web/lists/getbytitle('MyList')?$expand=Forms

https://myportal/_api/Web/lists/getbytitle('MyList')?$select=*

but the following query does not work correctly

https://myportal/_api/Web/lists/getbytitle('MyList')?$select=*&$expand=Forms

in fact, the above statement returns the same result as   https://myportal/_api/Web/lists/getbytitle('MyList') which is of course not what I want.

I cannot find any documentation or help around whether these 2 OData clauses are mutually exclusive in SharePoint 2013 REST or how to get this to work in a single call.

Has anyone been able to get this sort of thing working?

Thanks

Mike



Viewing all articles
Browse latest Browse all 25064

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>