Вопрос

It's been really strange, as per MSDN Link, they shows that Calculated fields can be get using REST query.

But when I am actually try REST queries like :

http://Server/_api/web/Lists(guid'2B3BD6CD-172B-4320-898F-30BA1DA0928E')/Fields

or

http://Server/_api/web/Lists(guid'2B3BD6CD-172B-4320-898F-30BA1DA0928E')/Fields/GetByTitle('Title of Calculated Field')

I could not find Calculated fields in the list of fields.

Can anyone please show the way to get Calculated fields using REST API??
Thanks in advance..

Это было полезно?

Решение

SharePoint REST API does return Calculated fields in REST query. FieldTypeKind of calculated column is 17. So make a GET request in following end-point.

/_api/web/lists/getbytitle('list title')/Fields?$filter=FieldTypeKind eq 17

It will return your all calculated fields. Test and Explore more about REST API using my SP REST Client.

enter image description here

Другие советы

I was able to resolve this issue in SharePoint 2013 using the SharePoint 2010 URI when pulling data.

$site + "/_vti_bin/listdata.svc/MyList()?"

See: https://sharepoint.stackexchange.com/a/235480/73740

Лицензировано под: CC-BY-SA с атрибуция
Не связан с sharepoint.stackexchange
scroll top