Forum Discussion
Gavin Squires
Dec 06, 2019Copper Contributor
Filtering Gallery based on SP list field and wildcard
Hi All, Here is my issue. I have an SP list for recording hazards on our factory floor. Each item in the SP list has a unique number i.e Hazard 1 Hazard 2 etc Along side this we have a d...
- Dec 08, 2019You don't have any kind of Lookup columns on the SharePoint list to help keep these Item's together with a key pair? If you had a lookup column in the doc lib, that referenced the hazards, then you could look up the hazard name, then it would be much easier to just match there, then have a separate column for the date, or does everyone not want to put in metadata and just upload files based on name?
You could also use Flows to set metadata for you.
Anyway, to match those by name as is you could try the following. (Don't know if you would have delegation issues or not, but worth a test)
Filter(Apps,StartsWith(Name = Gallery4.Selected.Title & "_")
So what I'm doing here, assuming all filenames have an underscore after the hazard, is temporarily for the filter appending an underscore to the selected Hazard, this way when it goes to match, StartsWith Hazard 1_06_etc would match Hazard 1_ and not Hazard 11_ etc.
Don't have a test setup to test, but off top of my head that should technically work, just dont' know about delegation.
Dec 08, 2019
You don't have any kind of Lookup columns on the SharePoint list to help keep these Item's together with a key pair? If you had a lookup column in the doc lib, that referenced the hazards, then you could look up the hazard name, then it would be much easier to just match there, then have a separate column for the date, or does everyone not want to put in metadata and just upload files based on name?
You could also use Flows to set metadata for you.
Anyway, to match those by name as is you could try the following. (Don't know if you would have delegation issues or not, but worth a test)
Filter(Apps,StartsWith(Name = Gallery4.Selected.Title & "_")
So what I'm doing here, assuming all filenames have an underscore after the hazard, is temporarily for the filter appending an underscore to the selected Hazard, this way when it goes to match, StartsWith Hazard 1_06_etc would match Hazard 1_ and not Hazard 11_ etc.
Don't have a test setup to test, but off top of my head that should technically work, just dont' know about delegation.
You could also use Flows to set metadata for you.
Anyway, to match those by name as is you could try the following. (Don't know if you would have delegation issues or not, but worth a test)
Filter(Apps,StartsWith(Name = Gallery4.Selected.Title & "_")
So what I'm doing here, assuming all filenames have an underscore after the hazard, is temporarily for the filter appending an underscore to the selected Hazard, this way when it goes to match, StartsWith Hazard 1_06_etc would match Hazard 1_ and not Hazard 11_ etc.
Don't have a test setup to test, but off top of my head that should technically work, just dont' know about delegation.
- Gavin SquiresDec 09, 2019Copper Contributor
Hi ChrisWebbTech , thanks for your reply. I hadn't thought about the lookup column. Sometimes it just takes someone else's point of view to change things. I've now added some meta data and have a linked column. It now works perfectly and no delegations issues.
Thanks for your help 🙂
Gav