Hedy M
Hedy M

Reputation: 1

Filter gallery by one column or another

I have a gallery with the following properties:

Referenced SharePoint list: 'Project Dashboard"
Variable: CurrentUser - this is set to User().email
Relevant columns in 'Project Dashboard' are submitter and executive sponsor

I can filter the gallery using this: Filter('Project Dashboard', Submitter=CurrentUser) and it works great, however I have been asked to now include results if the CurrentUser is listed under the 'Executive Sponsor' column as well. When I write this out it says invalid argument so I'm sure that I'm just using the OR function wrong.

Filter('Project Dashboard', Submitter=CurrentUser || 'Executive Sponsor'=CurrentUser)

Please let me know if you have any ideas for how to fix this.

Upvotes: 0

Views: 652

Answers (1)

SeaDude
SeaDude

Reputation: 4405

  1. Ensure you don't have any typos.
  2. Try using in or exactin in place of =

You could also try the long hand code:

Filter(
    'Project Dashboard', 
    Or(
        Submitter=CurrentUser,
        'Executive Sponsor'=CurrentUser
    )
)

Upvotes: 0

Related Questions