cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
MarcBailey
Level 8

Filter with Multiple Logical Test

I can get this to work correctly using either Logical Test by itself but when I try to add the second Logical Test I get an error with the following syntax:

 

Filter(Office365.GetEmails({folderPath: "Sent Items" && "Inbox",fetchOnlyUnread:false,top:10}),From=EmailLaunch || To=EmailLaunch)

 

Could someone provide the syntax to allow for both "Sent Items" and "Inbox".

 

Thanks, Marc...

2 ACCEPTED SOLUTIONS

Accepted Solutions
Highlighted
Super User
Super User

Re: Filter with Multiple Logical Test

@MarcBailey

 

Unfortunately, multiple folders is not supported by this function and I saw someone had put this up as as idea - 

https://powerusers.microsoft.com/t5/Flow-Ideas/Get-Outlook365-emails-from-folders/idi-p/77318

 

You could instead collect emails form both folders into a collection when the screen becomes visible and then set the gallery's items property to that Collection.

 

The code for OnVisble property of screen would be something like this -

 

Collect(Emailfromtwofolders,Office365.GetEmails({folderPath:"Inbox",fetchOnlyUnread:false,top:10}),Office365.GetEmails({folderPath:"Sent Items",fetchOnlyUnread:false,top:10}))

 

You could use the SortByColumns function in the gallery items proerty if you want to sort it by the date/time its received.

 

hope this helps


Vivek Bavishi aka That API Guy
PowerApps and Flow MVP
Blog | Twitter | YouTube | Community Profile | GitHub



If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Super User
Super User

Re: Filter with Multiple Logical Test

@MarcBailey

 

Use the HTML Text control instead of the Label control.

 

2018-02-22 14_02_40-Custom Analytics Demo - PowerApps.png

 

 


Vivek Bavishi aka That API Guy
PowerApps and Flow MVP
Blog | Twitter | YouTube | Community Profile | GitHub



If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

3 REPLIES 3
Highlighted
Super User
Super User

Re: Filter with Multiple Logical Test

@MarcBailey

 

Unfortunately, multiple folders is not supported by this function and I saw someone had put this up as as idea - 

https://powerusers.microsoft.com/t5/Flow-Ideas/Get-Outlook365-emails-from-folders/idi-p/77318

 

You could instead collect emails form both folders into a collection when the screen becomes visible and then set the gallery's items property to that Collection.

 

The code for OnVisble property of screen would be something like this -

 

Collect(Emailfromtwofolders,Office365.GetEmails({folderPath:"Inbox",fetchOnlyUnread:false,top:10}),Office365.GetEmails({folderPath:"Sent Items",fetchOnlyUnread:false,top:10}))

 

You could use the SortByColumns function in the gallery items proerty if you want to sort it by the date/time its received.

 

hope this helps


Vivek Bavishi aka That API Guy
PowerApps and Flow MVP
Blog | Twitter | YouTube | Community Profile | GitHub



If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

MarcBailey
Level 8

Re: Filter with Multiple Logical Test

@ThatAPIGuy

 

Thanks for the response and insight.  The Collection works great to pull multiple folders.

 

I do have another question that you might be able to help me on.  The BodyPreview displays in text but only about 30 words.  The Body displays in HTML.  Would you know how to get the entire Body to display in text format?

 

Thanks again for your help on this, Marc...

Super User
Super User

Re: Filter with Multiple Logical Test

@MarcBailey

 

Use the HTML Text control instead of the Label control.

 

2018-02-22 14_02_40-Custom Analytics Demo - PowerApps.png

 

 


Vivek Bavishi aka That API Guy
PowerApps and Flow MVP
Blog | Twitter | YouTube | Community Profile | GitHub



If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Helpful resources

Announcements
thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

Top Kudoed Authors
Users Online
Currently online: 209 members 5,410 guests
Recent signins:
Please welcome our newest community members: