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 Automate / Export Power App Galle...
Power Automate
Unanswered

Export Power App Gallery to Excel with Flow - Filter Query

(0) ShareShare
ReportReport
Posted on by 69

Hello!

I am working with a flow suggested by this video because I need to send data from a filtered Power Apps gallery to excel. I am having trouble with the filtering part of the flow. Sarvesh's power app has three different dropdowns that his users can use to filter. My users are entering a Reservation number into a TextInput box. So I don't know what parts of his query formula to use since I only have one parameter to filter by. The issue may be further complicated by the fact that the column I have to use to filter the gallery is a column brought along with a lookup column from a parent SP list, so it is an object and not a string. I don't know whether that will have any bearing on how I need to compose any query I might write. 

Here is the flow as of now:

CTASS_0-1706881248223.png

 

CTASS_1-1706881248065.png

 

CTASS_2-1706881248302.png

 

 

 

CTASS_3-1706881248331.png

 

CTASS_4-1706881248273.png

 

 

In the first Compose action, Sarvesh uses this formula:

concat(if(not(equals(variables('Project'),'All')),concat('Project eq ''', variables('Project') ,''' and '),''),
if(not(equals(variables('Contract'),'All')),concat('Contract eq ''', variables('Contract') ,''' and '),''),
if(not(equals(variables('Status'),'All')),concat('ApprovalStatus eq ''', variables('Status') ,''''),''))

Since I only have one variable, ResNum (from my power apps text input field), I have tried this:

concat(if(not(equals(variables('ResNum'),'All')),concat('ResNum eq ''', variables('ResNum'),''''),''))

And in Initialize Variable 2, I placed his recommendation to get rind of any trailing "ands" even though I do not have any ands in my formula. I probably don't need it but I only know enough to be dangerous so I just copied him:

if(endswith(outputs('Compose'),' And '),substring(outputs('Compose'),sub(length(outputs('Compose')),5),length(outputs('Compose'))),outputs('Compose'))

Here is the code on my the "On Select" of my button in my app:

Concurrent(
 Notify("Working on it...",NotificationType.Information),
 Set(csvFileURL, FilteredExport.Run(Value(TextInput1.Text)
 )))
 

Sarvesh's "on select" formula is different but my app did not like the .fileurl part or the launch part so I took them out for now. Here's what he wrote: (if anyone has any clues as to the .fileurl or launch problems that might come in handy also!)

Concurrent(
 Notify(
 "Working on it...",
 NotificationType.Information
 ),
 Set(
 csvFileURL,
 ExportTenantsData.Run(
 projectsDropdown.Selected.Value,
 contractDropdown.Selected.Value,
 statusDropdown.Selected.Value
 ).fileurl
 )
);
Launch(csvFileURL);

 

When I click the button, obviously without the launch nothing happens (other than the "Working on it" notification) and I don't get any errors on the power app, but when I go to the flow page, there is an error on the "Get Items" action that says, "The expression "'ResNum eq '183664'" is not valid. Creating query failed."

At least I know it is seeing the proper reservation number! '

Is anyone able to help me write a query that will work? I would appreciate the help!!

Thanks in advance!

Categories:

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 Automate

#1
11manish Profile Picture

11manish 321 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 244

#3
Henil Profile Picture

Henil 102

Last 30 days Overall leaderboard