I have been given images with the following file name nomenclature LS1234_Larry_Smith_Professor.pdf.
The images can be stored in Power Apps Media or a SP library.
Assuming the first 6 characters of the file name are also in a SP list column called UnqID, is there a way to write a 'wildcard' type filter in a Gallery - through a dropdown - that will return the specific image associated with the content of the dropdown, in this case LS1234; and change the images to match the content of the dropdown when there is a change in the dropdown?
The best search or filter will depend upon how many items there are in your list. Please indicate how many names there are and how many you expect to be in the list over time.
Assume 5,000. Each staffer may have several certifications/qualifications, and additional may be add for existing staff or new staffers and their cert/quals added in the future.
Unfortunately, your searches will have delegation limits so you cannot easily use a Search() function or Filter using the "in" operator. SharePoint supports using Filter() and StartsWith() and these functions will work regardless of the size of the list.
To use Search() and Filter() with "in", you will need to create a collection from your data. There are a number of posts here regarding the best way for creating a big collection from your SharePoint data. I personally have found SharePoint to be too limiting when dealing will lists containing more than 4000 items and recommend that you consider using CDS or SQL instead if you expect your app to grow over time and stay functional. The main downside is that the latter have an additional cost associated with them but they can handle data sources with millions of items.
Ok, hope springs eternal.
Can you show me how the filter would look using the example file I provided, and where in the properties the filter would go?
There are probably a number of different ways to handle this. I would start by modifying the SharePoint file to separate out the UnqID, ProfName, and Title into separate columns. Then you could filter the list as follows
Filter( yourlist, StartsWith( ProfName, SearchInput.Text ) || StartsWith( Title, SearchInput.Text ) || StartsWith( UnqID, SearchInput.Text ) )
This formula would be in the Items property of a gallery or data table. The Textinput box would be called SearchInput.
Check out our new profile badges recognizing authored solutions!
We are excited to announce the Power Apps Super Users!
Did you miss the call? Check out the Power Apps Community Call here.
Join digitally, March 2–4, 2021 to explore new tech that's ready to implement. Experience the keynote in mixed reality through AltspaceVR!