cancel
Showing results for 
Search instead for 
Did you mean: 

Odata Filters & nested objects with Microsoft Flow

 

Last week, Kent Weare from the Microsoft Flow team illustrated the usage of the very convenient and elegant oData Filter in Microsoft Flow. Read his blog post to have a good background on OData and Flow.

 

As a follow-up of this blog post I would like to get a little bit deeper with a more specific example that I had to solve last year : filtering on a nested field like the e-mail address of a SharePoint Person column.

If you have the following SharePoint list with 2 columns of type Person or Group : Managee and Manager

 

managermanagee

 

…and your flow needs to retrieve the Manager of ‘serge luca’ (sergeluca@redwoodsl.onmicrosoft.com).

 

The oData filter query will be the following :

 

managermanagee2

 

How did I know this ?

 

Use the Get items action in your flow without using any filter, debug it and check the output JSON : we get something like this :

 

managermanagee3

 

so Managee/Email is the good filter syntax : indeed Email  is the nested field and its  path is Managee/Email.

…and yes the Eq operator is very case sensitive : Managee/email won’t work ...

Comments

Thanks for your post, this is something that I've been trying to work out for ages.

However, I have tried to replicate this, but everytime the Flow runs I get a "BadGateway" error:

 

Capture.PNG

 

The Body of the error is:

Capture2.PNG 

My "Cascade Child 1" list has a (single value) Person column in it called "Person".

 

Can you see what I'm doing wrong?

Thanks for any assistance,

Ian

 

*** Update ***

I have worked this out myself, it was the case of "Email" causing the issue.  In your notes it mentions "EMail" and "Email", and in the screenshot of JSON output it shows as "Email".  I thought the case in the JSON output would have been correct and your references to "EMail" in your notes maybe a typo.  However, changing my filter query to "EMail" worked!

 

I'm having a different issue with this.

 

When I use the filter, I'm able to get the item "Managee" which matches the criteria, but I'm not able to get the info from the "Manager" column beside it. What was the next step?

 

(The "Manager" email / department / etc. options all vanish from the dynamic content options for following steps).

Wow... so in JSON summary one can find "Email" but you still need to put "EMail" in the query. So logical... thanks Microsoft

Super User III

Like it mentioned in the update EMail (Case sensitive) works. To filter by DisplayName it doesn't work either. Not sure where we can get this schema name similar to EMail.

Meet Our Blog Authors
  • Experienced Consultant with a demonstrated history of working in the information technology and services industry. Skilled in Office 365, Azure, SharePoint Online, PowerShell, Nintex, K2, SharePoint Designer workflow automation, PowerApps, Microsoft Flow, PowerShell, Active Directory, Operating Systems, Networking, and JavaScript. Strong consulting professional with a Bachelor of Engineering (B.E.) focused in Information Technology from Mumbai University.
  • Encodian Owner / Founder - Ex Microsoft Consulting Services - Architect / Developer - 20 years in SharePoint - PowerPlatform Fan
  • Cambridge UK Power Platform User Group Leader, Technical evangelist and speaker. Always says yes to coffee! #LetsGetCoffee
  • Passionate #Programmer #SharePoint #SPFx #Office365 #MSFlow | C-sharpCorner MVP | SharePoint StackOverflow, Github, PnP contributor
  • I am building business processes and applications that are easy for users' to stick to, so they can follow and understand them. In overall I transform processes to be more reliable and effortless. I am a proud co-organizer of SharePoint Saturday Warsaw and active community member, blogger and international speaker.