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.

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

Helpful resources

Announcements
Ignite 2022

WHAT’S NEXT AT MICROSOFT IGNITE 2022

Explore the latest innovations, learn from product experts and partners, level up your skillset, and create connections from around the world.

Power Apps Africa Challenge 2022

Power Apps Africa Challenge

Your chance to join an engaging competition of Power Platform enthusiasts.

Super User 2 - 2022 Congratulations

Welcome Super Users

The Super User program for 2022 - Season 2 has kicked off!

September Events 2022

Check out all of these events

Attend in person or online, there are incredible conferences and events happening all throughout the month of September.

Users online (2,216)