I have a PowerApp that im creating using SPO list for the data source. I’m trying to create the search page for the app and I’m running into conflicting/old info on how to get it to work how I need it to. Most tutorials and articles touch on this but it doesn’t match my scenario exactly, either they show the search function and then they have delegation issues, or they show only one filter based on a single dropdown, or some just don’t work due to the info being out of date and the formula changed.
The summary of what I’m trying to do is create a search page when I can search independently or by a combination of ID, region (dropdown), account code(dropdown) and date.
In SPO I have the following columns in a list called “master list”
Regionclm : Choice field
Account_Infoclm: Choice Field
Dateclm: Date and Time field
In PowerApps I have the following on the canvas
Text box named FormIDInput : For searching via ID
ComboBox named Cb_Region: to select single entry from Regionclm in SPO
ComboBox named Cb_Account: to select single entry from Regionclm in SPO
Vertical Gallery tied to a the Master in SPO
I did the obvious thing first and tried the filter:
Filter('Master List', Cb_Region.SelectedText.Value in Regionclm.Value)
This returned a delegation error due. While I don’t anticipate these list having more than 2000 records I wanted to avoid this and at this time the Dataverse or SQL DB is not an option.
The next thing I tried based on tutorial I followed by Reza Dorrani. This involved using a Flexible Height Gallery and hide the different controls within a record based on the filter.
I created 2 collections on the canvas “Onvisible”
ClearCollect(ColOperatingUnit, {Value:"All Units"},Choices('Master List'.Regionclm));
ClearCollect(ColAccount, {Value:"All Accounts"},Choices('Master List'.' Account_Infoclm'));
I added these collections to the combo boxes, I then grouped the items within the Flexible Height Gallery and added the following to the “Visible” property
Cb_OperatingUnit.Selected.Value in ThisItem.HM_OperatingUnit.Value ||
Cb_Account.Selected.Value in ThisItem.'HM_Account '.Value
This worked (kind of) but its not actually filtering its just displaying the results, I’m guessing this would have been fine if I only had to do this with one combobox.
I know there must be a more efficient/correct way to do this, but the delegation issue keeps coming up or it complains that the column is in valid with certain other formulas due to it being a complex field. Does it make sense to recreate that column into a plain text and just have my power app send that data over to that SPO column?


Report
All responses (
Answers (