gokanovic
gokanovic

Reputation: 11

SharePoint 2013 rest api - error expanding lookup column of type boolean

The request url is:

http://serverUrl/_api/web/lists/getByTitle('Weekstaten')/items(1)?$select=Id,Projecten/Klant,Projecten/OpLocatie&$expand=Projecten

Projecten is a MultiLookup field to another list.

When I want to expand a boolean field named OpLocatie, I get the following error:

The query to field 'Projecten/OpLocatie' is not valid.

This only happens with boolean fields. I'm sure that the name of the field is correct and also the url.

Could anyone points me the direction to follow to solve this issue?

Upvotes: 1

Views: 1377

Answers (2)

Melvin Vermeer
Melvin Vermeer

Reputation: 126

When you create a calculated field in your Projecten list and use that field in your REST query it will work.

The formula can be [OpLocatie] and the type can be string.

Upvotes: 1

Melvin Vermeer
Melvin Vermeer

Reputation: 126

I've got the same problem with a single lookup. For now I'll solve it by making some extra requests to fetch the boolean field.

Upvotes: 1

Related Questions