cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
JR-BejeweledOne
Super User
Super User

Filtering on a lookup field Sharepoint list

I have 2 SharePoint lists

 

TeamsSupportInfo - List of teams

    Columns: Title, TeamStatus (Choice), Has Scheduled On-call Team (Choice) and ShowName (Choice)

 

ITSupportContacts

   Columns: SupportTeam - Lookup to TeamsSupportInfo (Title column)

   Show (Yes/No checkbox)

 

In my app I have a combobox (ComboBoxTeamSelector)

Sort(Filter(TeamsSupportInfo, TeamStatus.Value = "Active" && 'Has Scheduled On-Call Team'.Value = "No"), Title, SortOrder.Ascending)

 

I have a table that I am filtering with the selected item in the combobox.  Both of these give delegation errors , but do return the items

Filter(ITSupportContacts, Show = true && ComboBoxTeamSelector.Selected.Title in SupportTeam.Value)

Filter(ITSupportContacts, Show = true && SupportTeam.Id = ComboBoxTeamSelector.Selected.ID)

 

This has no delegation errors, but doesn't return anything either

Filter(ITSupportContacts, Show = true && SupportTeam.Value = ComboBoxTeamSelector.Selected.Title)

 

How can I change this to get the desired result with no delegation errors?

 



If you like this post, give it a Thumbs up. If it answered your question, Mark it as a Solution to enable other users find it.
1 ACCEPTED SOLUTION

Accepted Solutions
StalinPonnusamy
Community Champion
Community Champion

Hi @JR-BejeweledOne 

 

With(
    {_item: ITSupportContacts},
    Filter(
        _item,
        Show && SupportTeam.Value = ComboBoxTeamSelector.Selected.Title
    )
)

 

We can display a full list If Combobox is not selected (If needs it)

With(
    {_item: ITSupportContacts},
    Filter(
        _item,
        IsBlank(ComboBoxTeamSelector.Selected) || (Show && SupportTeam.Value = ComboBoxTeamSelector.Selected.Title)
    )
)

 


Thanks,
Stalin

Learn To Illuminate

View solution in original post

4 REPLIES 4
StalinPonnusamy
Community Champion
Community Champion

Hi @JR-BejeweledOne 

 

With(
    {_item: ITSupportContacts},
    Filter(
        _item,
        Show && SupportTeam.Value = ComboBoxTeamSelector.Selected.Title
    )
)

 

We can display a full list If Combobox is not selected (If needs it)

With(
    {_item: ITSupportContacts},
    Filter(
        _item,
        IsBlank(ComboBoxTeamSelector.Selected) || (Show && SupportTeam.Value = ComboBoxTeamSelector.Selected.Title)
    )
)

 


Thanks,
Stalin

Learn To Illuminate

View solution in original post

StalinPonnusamy
Community Champion
Community Champion

Example

 

StalinPonnusamy_1-1632516802726.png

 

StalinPonnusamy_0-1632516786970.png

 


Thanks,
Stalin

Learn To Illuminate
StalinPonnusamy
Community Champion
Community Champion

Hi @JR-BejeweledOne 

 

Please let us know if anything needs on your post. We can help with this.


Please do not forget to give kudos if you find the suggestion helpful or Accept it as a solution if works fine to help other users to find it useful.

 


Thanks,
Stalin

Learn To Illuminate

Sorry, I must have gotten distracted with something else and never tried it.  It works!



If you like this post, give it a Thumbs up. If it answered your question, Mark it as a Solution to enable other users find it.

Helpful resources

Announcements
PA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Welcome Super Users.jpg

Super User Season 2

Congratulations, the new Super User Season 2 for 2021 has started!

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Top Solution Authors
Top Kudoed Authors
Users online (966)