Skip to main content

Notifications

Dynamics 365 general forum

oData inner filter in $expand

Posted on by Microsoft Employee

Hi,

Currently I am facing some issues while querying the oData services. I am very new to oData query syntax.

I am trying to query oData service using the following url

mysite/DataQueryGroups$select=Id,Name&$filter=IsHidden eq false&IsShared ne false&$expand=DataQueries($select=Id,Name,IsPinned;)

which returns the desired results to me. Above query basically returns all DataQueryGroups where IsHidden=false and IsShared<>false, including the its child entity DataQueries.
Now I want to add filter to the DataQueries enity to display only those resulsts where IsPinned = true. So I have tried the following query

mysite/DataQueryGroups$select=Id,Name&$filter=IsHidden eq false&IsShared ne false&$expand=DataQueries($select=Id,Name,IsPinned;$filter=IsPinned eq true;)

But this returns me the same results and it looks like its not considering the inner filter/last filter which I have specified on DataQueries entity.

I am verifying the queries using the Advanced REST client extension in Chrome

I would like to know how to filter on parent and child entities and return the fields from both.

I am finding difficulties to under this syntax. Please let me know if anybody can help me on this issue.

Currently I am using oData version 6.11.0.0

I am not sure if this is the right forum to ask my question, if not please guide me to the proper forum

Thanking you in advance
Deepak

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: oData inner filter in $expand

    Hi Deepak KK,

    What Microsoft Dynamics product are you using?

    Thanks,

    Archie Haus | Microsoft Dynamics Community Manage

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

November Spotlight Star - Khushbu Rajvi

Congratulations to a top community star!

Forum Structure Changes Coming on 11/8!

In our never-ending quest to help the Dynamics 365 Community members get answers faster …

Dynamics 365 Community Platform update – Oct 28

Welcome to the next edition of the Community Platform Update. This is a status …

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,240 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,149 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans