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 / PowerApps query failin...
Power Apps
Unanswered

PowerApps query failing in power automate

(0) ShareShare
ReportReport
Posted on by 2

I'm using powerapps to inventory tech at our campuses. Have the powerapps working perfectly. I want to use power automate to let users send selections to an email that has an attached CSV, embedded HTML, and attached PDF. Where I'm failing is the query. The query works on my gallery, but it fails in power automate. Here's a stripped down version to show the core of the query. The sharepoint list is 'Computer Peripherals Inventory'. The ddType and ddManuf are dropdown lists. Any help is greatly appreciated!

ExportTasks is my PowerAutomate.

 

ExportTasks.Run("Filter(
If(
ddType.Selected.Result = "All" and ddManuf.Selected.Result = "All", 'Computer Peripherals Inventory'))",User().Email);

Categories:
  • BCBuizer Profile Picture
    22,899 Super User 2026 Season 2 on at

    Hi @TedCole ,

     

    Are you trying to send a Power FX formula to Power Automate as plain text together with the user's mail address?

     

    Perhaps you can share in plain text how this is supposed to work?

  • TedCole Profile Picture
    2 on at

    Thanks for the response! I'm trying to send the records currently selected in the powerapps program as a flow in power automate. I can strip out the last part re: User().Email since that's later in the flow for sending to the current user's email. The flow is failing at the query stage so I don't  know if the records need to be reformatted to work? First time working with Power Automate flow so sorry for the ignorance. It's all failing at the query stage in Flow when I test it. Even removed the references to the current user and email. Is that what you're asking for? My apologies if I'm sounding dense. In extreme pain right now due to back injury and on pain meds.

    PowerApp1.jpg
    PowerApp2.jpg
  • BCBuizer Profile Picture
    22,899 Super User 2026 Season 2 on at

    Hi @TedCole,

     

    The Get Items action in Power automate uses Odata queries and not Power FX, so this will not work. Moreover, the Power Automate flow is not aware of the controls in your Power App, so you can't reference those.

     

    For this to work I suggest you build an Odata query. Something along the lines of:

     

    ExportTasks.Run(
     If(ddType.Selected.Result = "All", "", "type eq " & ddType.Selected.Result) & If(ddType.Selected.Result = "All" || ddManuf.Selected.Result = "All", "", " and ") & If(ddManuf.Selected.Result = "All", "", "manufacturer eq " @ & ddManuf.Selected.Result),
     User().Email
    )
    

     

    The above will result give the below result, based on the selections in both dropdowns:

     

    ddType.Selected.Result ddManuf.Selected.Result Outcome Behavior in Power Automate
    "All" "All" "" No filter applied
    "All" "ABC" (anything but "All") "manufacturer eq ABC" Manufacturer column filtered
    "ABC" (anything but "All") "All" "type eq ABC" Type column filtered
    "ABC" (anything but "All") "ABC" (anything but "All") "type eq ABC and manufacturer eq ABC" Type and Manufacturer columns filtered

     

    More info on Odata can be found here: OData language overview - Azure Cognitive Search | Microsoft Learn

     

    Ps. Hope your back recovers soon

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

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 221 Super User 2026 Season 2

#2
WarrenBelz Profile Picture

WarrenBelz 188 Most Valuable Professional

#3
Mohsin Ali Profile Picture

Mohsin Ali 120

Last 30 days Overall leaderboard