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 / Export Filtered Galler...
Power Apps
Unanswered

Export Filtered Gallery 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 gallery to excel. I am having trouble with the filtering part though. 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 lookup column, 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-1706820850253.png

CTASS_7-1706824170339.pngCTASS_8-1706824212912.png

 

 

CTASS_2-1706820958607.png

CTASS_5-1706822000653.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, 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:

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

Sarvesh's 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!)

CTASS_6-1706823762332.png

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.
clientRequestId: e001a5c7-3bc9-4b58-9d31-f45eaacf00b8
serviceRequestId: e001a5c7-3bc9-4b58-9d31-f45eaacf00b8"

 

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:
I have the same question (0)
  • WarrenBelz Profile Picture
    156,080 Most Valuable Professional on at

    Hi @CTASS ,

    You are welcome to post here, but this seems to be a Power Automate question and you will probably get a quicker response from the experts over at the Power Automate Community

     

    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.

    MVP (Business Applications)   Visit my blog Practical Power Apps

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 June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 339 Most Valuable Professional

#2
11manish Profile Picture

11manish 180

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 88 Super User 2026 Season 1

Last 30 days Overall leaderboard