Skip to main content
Community site session details

Community site session details

Session Id :
Power Apps - Building 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!
  • WarrenBelz Profile Picture
    148,811 Most Valuable Professional on at
    Filter gallery which is based on sharepoint list but include a lookup to another sharepoint list
    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

     
  • Suggested answer
    mmbr1606 Profile Picture
    13,193 Super User 2025 Season 1 on at
    Filter gallery which is based on sharepoint list but include a lookup to another sharepoint list
    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

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

Paul Stork – Community Spotlight

We are honored to recognize Paul Stork as our July 2025 Community…

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 791 Most Valuable Professional

#2
MS.Ragavendar Profile Picture

MS.Ragavendar 410

#3
mmbr1606 Profile Picture

mmbr1606 275 Super User 2025 Season 1