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).

Meet Our Blog Authors
  • Co-founder of https://plumsail.com, Office 365 and SharePoint expert. Passionate about design and development of easy to use, convenient and flexible products.
  • I'm the owner of ThriveFast, an Office 365 consulting company. I'm a developer and have been working with SharePoint since 2007.
  • 7x Microsoft Business Solutions MVP (CRM)
  • Solution Architect with Slalom, and organizer of the Boston Office 365 User Group, and long term SharePoint/Office 365 veteren. Find more at http://www.davidlozzi.com. Follow @DavidLozzi
  • I'm keen in MS technologies, SharePoint, Office 365 and development for them
  • Michelle is an Office 365 solution architect in Twin Cities, MN. She has been delivering business collaboration solutions for years with her focus on SharePoint and Office 365. Michelle is a recent board member of the Minnesota Office 365 User Group and has been a member of the SharePoint community since 2009. She is a frequent speaker at MNSPUG and SharePoint Saturday and co-chaired the Legal SharePoint User Group for 4 years. Her most frequent projects have involved rolling out a large deployment of Office 365, SharePoint Online intranet, build of a "CHAMPS" Office 365 user adoption program and most recently, SharePoint On-Premise to Online Migration. Michelle is very excited about cloud technology as it is shifting her IT Pro focus to collaboration strategy and technical adoption.
  • I'm a Microsoft Office Servers and Services MVP with a special interest in SharePoint, Office 365, Microsoft Flow, Microsoft Teams and PowerApps. I work at Triad Group Plc ( http://triad.co.uk)
>