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

Report
All responses (
Answers (