web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Filter gallery which i...
Power Apps
Suggested Answer

Filter gallery which is based on sharepoint list but include a lookup to another sharepoint list

(0) ShareShare
ReportReport
Posted on by 187
Hi all,

Need some help since I'm running into delegation issues / errors.

Situation: 
I have a sharepoint list named Planning

Items setup as:
Sort(
    Filter(
        'Planning',
        StartsWith(Platform, txt_Search_Platform.Text)
    ),
    'CAC_Name'
)

So far so good and it shows me all items in the gallery. In the gallery items I have a checkbox with the following default value:
If(
    LookUp('Planning_Input', CAC_SFC = ThisItem.CAC_SFC, Reviewed) = "true",
    true,
    false
)
which will nicely show a check in case reviewed is true and otherwise empty.

Now I have a checkbox outside of the gallery, named chk_box1

If that is checked I want to exclude from my gallery all the items where reviewed is true. Tried modifying like this:

If(
chk_box1.Value = true,
Sort(
Filter(
'Planning',
StartsWith(Platform, txt_Search_Platform.Text) &&
!(CAC_SFC in Filter('Planning_Input', Reviewed = "true").CAC_SFC)
),
'CAC_Name'
),
Sort(
Filter(
'Planning',
StartsWith(Platform, txt_Search_Platform.Text)
),
'CAC_Name'
)
)

which seems to do the trick but I get a delegation issue. Is there a way to avoid the delegation?

Also tried stuff like using Lookups to Planning_Input, CAC_SFC = ThisRecord.CAC_SFC but all to no avail :(
So basically for the items in the gallery I'm dependent on the reviewed true/false in a different list for CAC_SFC.
Important to note is that the sharepoint list is around 3k records and the users are reviewing items which are stored with their CAC_SFC in the Planning_Input list.
Assuming once everything is reviewed that list will hold the exact same numbers of records but with additional details which we do not want to store in the Planning list.

Any ideas appreciated!
Categories:
I have the same question (0)
  • Suggested answer
    mmbr1606 Profile Picture
    14,629 Super User 2026 Season 1 on at
    hey
     
     
    you can try to work with collection:
    ClearCollect(colReviewed,
        Filter('Planning_Input', Reviewed = "true").CAC_SFC
    );
    
    Items property of the gallery:
    Sort(
        Filter(
            'Planning',
            StartsWith(Platform, txt_Search_Platform.Text) &&
            (chk_box1.Value = false || !(CAC_SFC in colReviewed))
        ),
        'CAC_Name'
    )
    
     
     
    if my reply helped please mark as verified answer
     
     
    cheers
  • WarrenBelz Profile Picture
    155,752 Most Valuable Professional on at
    Another option that can be contained directly in the Filter
    With(
       {
          _Data:
          Sort(
             Filter(
                'Planning',
                StartsWith(
                   Platform, 
                   txt_Search_Platform.Text
                )
             ),
             'CAC_Name'
          ),
          _Plan:
          Filter(
             'Planning_Input', 
             Reviewed = "true",
             CAC_SFC
          )
       },
       Filter(
          _Data,
          !chk_box1.Value ||
          !(CAC_SFC in _Plan.CAC_SFC)
       )
    )
     
    Please click Does this answer your question if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it a Like.
    MVP (Business Applications)     Visit my blog Practical Power Apps    Buy me a coffee

     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Launch!

Jump in, show your community spirit, and win prizes!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Valantis Profile Picture

Valantis 483

#2
WarrenBelz Profile Picture

WarrenBelz 399 Most Valuable Professional

#3
11manish Profile Picture

11manish 327

Last 30 days Overall leaderboard