cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
MarcBailey
Resolver II
Resolver II

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

@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

 

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

@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

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

@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
PA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

Power Query PA Forum 768x460.png

Check it out!

Did you know that you can visit the Power Query Forum in Power BI and now Power Apps

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

PowerPlatform 768x460.png

Microsoft Learn

Check out our new Discover Your Career Path blog post series and get all the details.

Users online (1,227)