JustMe
JustMe

Reputation: 147

Rest API $expand

I am trying to use the REST API $expand and $filter on my list but the filter does not work.

I have 2 lists called TicketType and TicketingSytem. There is a parent child relationship between the two. "TicketingSystem" is the parent and "TicketType" is the child. When I perform the following rest, the columns from my child list show but, it does not filter.

Any ideas?

http://isaac.issharepoint.com/_vti_bin/ListData.svc/TicketingSystem?$expand=TicketType&?$filter=TicketType/ID eq 10

Upvotes: 0

Views: 4702

Answers (2)

QianLi
QianLi

Reputation: 1098

Another way to use $filer in $expand should be http://isaac.issharepoint.com/_vti_bin/ListData.svc/TicketingSystem?$expand=TicketType($filter=TicketType/ID eq 10). This is described in OData spec

Upvotes: 1

qujck
qujck

Reputation: 14580

You only need one ? in the URL - it separates the path from the query string, try it like this:

http://isaac.issharepoint.com/_vti_bin/ListData.svc/TicketingSystem?$expand=TicketType&$filter=TicketType/ID eq 10

Upvotes: 1

Related Questions