I am seeking the option to pull data into an app based on one or multiple search criteria. The SP list, where the data is housed, has 33k + items. My goal is to provide the user a Search screen and not pull any data into the app until they query it. If a user selects multiple criteria, i.e. State, Project Year, and Project Category, I would like to display the data in a gallery. If a user selects a unique item, based on project number, then I would like to display the details for that project in a DisplayForm or Labels.
The question is - how can i query the data in SP. I understand delegation and was trying to test by displaying a project utilizing the Lookup function. However, that does not work.
Tagging all who I follow or have been most responsive. Thank you!
You could use a formula below to search for multiple columns:
Search( List, SearchBox1.Text, Column1 , Column2, ... )
On the Visible property of the Gallery, set to:
But notice that search function would become non delegable when using a lookup field. This is known limitation.
About the display form when picking an project number, you could insert a dropdown control, set the Items property to the project numbers like:
For the display form, set the data source to the list, and the Items property to:
Yet I just tested, this seems also non-delegatable.
When I test this, I used the ID column, and it seems that there might be something wrong with SharePoint and powerapps, I cannot get other columns like number column type. So I'm not sure if the non-delegation is related to the ID column. Please try with number field when able to see if this works.
@v-monli-msft- Thank you for you detailed reply.
So, in essence, there is no way to work with a list this large and delegate the search to the SP source to only pull in the records a user filters on rather than trying to pull in all 33k items?
Given that this is a known issue, is there a plan to change this in the near future?
If the columns you plan on using as filters are text fields and not a complex field type (e.g. Choice, Lookup, Date and etc) then you could write a filter formula that is delegable. Since your list is over 5k you will also want to make sure the fields you want to filter on are indexed in the SP list.
Jeff - thank you for your reply. I'm a bit confused on thi because one response, from a MS Staff member says it is not possible to delegateand bring back the data given the number of items in the list. You are stating it is possible.
Yet, I have read all your posts related to this on other inquiries and applied as you have instructed others with no luck. The column I am trying to filter is a single line of text column. The data within the column is a unique project number (as text). This large 'Master Project' list has indices established. Is there something in the formula that must point to the indexed column? if so, can you please post an example?
Certain query functions and field types are delegable and others are not. If you are using a non-delegable function or field type then list size and the non-delegable query size limit comes into play. If you are using field types and functions that are delegable for your data source then you have some options. For example I have a sample list that contains most of the US Zip Codes. That list has almost 41k items. I have built a gallery that will filter that list on "New York" and with a lot of scrolling the gallery is showing 2,153 zip codes which above the non-delegable query size limit. I am able to do this because I am using delegable functions, operators and field types support by the data source. In my case I am using SharePoint, Filter(), "=" operator, text field in SP and my state column in the SP list is indexed.
FYI: It isn't a great experience scrolling through 2k+ records in a gallery.
Jeff - will you please show how you reference the indexed column in your fx to the SP list. Is it similiar to SQL where the datasoure is appended with the indexed column name, for example: 'Datasource'.ProjectSeqNo?
I would greatly appreciate it if you would share the formulas for the below example you provided.
@tianaranjo, I reference the SP column name like you would any other SP text field in PowerApps. In SP I went to the list settings page and clicked on "Index columns" in the column section. Then clicked on "create a new index" and selected the State column.
The gallery only loads the first 100 then when you scroll to the bottom it loads another 100. In order to get them all to show in the gallery I have to scroll to the bottom to get another hundred to load then scroll up a little and back down to the bottom to get the next 100 to load. You just keep doing this process and all the items will show in the gallery. Each batch of 100 items only took a few seconds to load but the process of scrolling up and down was not user friendly.
Check out new user group experience and if you are a leader please create your group
Did you know that you can visit the Power Query Forum in Power BI and now Power Apps
Participate in the Power Virtual Agents Community Challenge
Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.