web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Filtering emails displ...
Power Apps
Unanswered

Filtering emails displayed in a gallery

(0) ShareShare
ReportReport
Posted on by 144

Hi all,

 

I am trying to filter the emails that show up in my gallery so that the only emails displayed are those that contain an ID called the "Trade Number"

cnr_2-1654149440697.png

 

However I have not been very successful. The emails showing are not correct. My connector is below, with varTradeNumber being the variable holding the Trade Number. Would anyone have any suggestions ?

Office365Outlook.GetEmails(
 {
 folderPath: "Inbox",
 fetchOnlyUnread: false,
 searchQuery: varTradeNumber
 }
)

 

Thanks,

Conor

Categories:
I have the same question (0)
  • Shujaath_Khan Profile Picture
    1,111 Super User 2024 Season 1 on at

    Hi @cnr 

    I tried the same with the formula

     

     

    Office365Outlook.GetEmails({fetchOnlyUnread:false,searchQuery:txtSearchInput.Text})

     

     

     I was able to fetch the results for 12398

    shujaathkhan_0-1654150423246.png

    shujaathkhan_1-1654150453042.png

     

    Can you confirm if varTradeNumber is actually holding value if it's not holding any value or ="" by default all Inbox content would be shown in gallery

    Try: Can you try with the Input field and check

     

    Thanks

     

    Please click Accept as solution if my post helped you solve your issue. If the content was useful in other ways, please consider giving it Thumbs Up.

  • cnr Profile Picture
    144 on at

    Hi @Shujaath_Khan ,

     

    Thanks for the reply, it seems that now I retrieve some but not all the emails. I checked and the variable varTradeNumber did have a value.

     

    cnr_0-1654153106853.png

     

  • Shujaath_Khan Profile Picture
    1,111 Super User 2024 Season 1 on at

    Hi @cnr 

    You can also try to use top: limit  ( top : 500)

     

    Office365Outlook.GetEmails({fetchOnlyUnread:false,searchQuery:txtSearchInput.Text, top:100})

     

    Similar thread on throttling limit https://powerusers.microsoft.com/t5/Building-Power-Apps/Office365-GetEmails-only-shows-25-mails-from-a-useraccount/td-p/113448

     

    Thanks

     

     

  • WarrenBelz Profile Picture
    156,277 Most Valuable Professional on at

    Hi @cnr , 

    You can only retrieve the first 25 emails - if you follow the thread link posted by @Shujaath_Khan , you will see that this is the limit mentioned there too. Here is a test to confirm this

    WarrenBelz_0-1654411017631.png

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

    Visit my blog Practical Power Apps

     

  • Shujaath_Khan Profile Picture
    1,111 Super User 2024 Season 1 on at

    hi @WarrenBelz 

     

    The same limit is applied on Power Automate either.

     

    shujaathkhan_0-1654411267172.png

     

    The workaround I could see here to rely on graph API via Power automate.

    https://graph.microsoft.com/v1.0/me/messages?$top=100&$search="viva"

    Thanks

     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 396 Most Valuable Professional

#2
11manish Profile Picture

11manish 134 Super User 2026 Season 2

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 101 Super User 2026 Season 2

Last 30 days Overall leaderboard