5

I have a problem with retrieving the Description from an Url Field via the Rest Api from SharePoint.

If I make a call and select an Url Field with the normal $select

_api/web/lists/getbytitle('TestList')/items(1)?$select=FolderUrl

It retrieves automatically the Url Value from the Url Field.

So I have tried to do it with a Expand:

_api/web/lists/getbytitle('TestList')/items(1)?$select=FolderUrl/Description&$expand=FolderUrl

But that query doesn't work.

So how can I obtain the Description Information from a Url Field via the Rest API?

1 Answer 1

5

When you use URL

_api/web/lists/getbytitle('TestList')/items(1)?$select=FolderUrl

You will get two properties

  1. d:Description
  2. d:Url

So you don't need to expand

<m:properties><d:FolderUrl m:type="SP.FieldUrlValue"><d:Description>Google Description</d:Description><d:Url>http://google.com</d:Url></d:FolderUrl></m:properties>

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.