
Announcements
I have built a shop app containing a gallery view of all available items. The items are stored in a Sharepoint list.
In the SP List, i have a column called 'Department', in which I have comma-separated values, such as "Sales, Warehouse, All"
I want to filter the gallery view based on the persons Department (which I get from Office365Users connection).
How would i go about using Filter() to do this?
I started with this:
Filter(
'Shop Items', ThisRecord.Dept = Office365Users.MyProfileV2().department
)
This almost gives me what I want, but only if there is one value in the Department column, if there are multiple values, then I guess I need to change this to say 'Contains' but I don't know how to do that.
With the above, I also get delegation warnings and also don't know how I would include any items that have "all" in the Department column.
Any suggestions please?
You will not be able to filter by that column the way you have it set up, without delegation warnings. you would be better off making a column for each department, and one for all. Make them all single line of text.
next make a app that connects to the list and make a button that will cycle through all the items, split their current comma seperate columns, and use that data to set the value "true" and "false" in each of those other single line of text columns (or use a flow, easy either way). then after that just filter by those columns