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:
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!)
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!

Report
All responses (
Answers (