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 / highlighting dupes in ...
Power Apps
Answered

highlighting dupes in gallery -delegation warning

(0) ShareShare
ReportReport
Posted on by 1,257 Super User 2024 Season 1

I'm using the following to highlight dupes in a gallery based on 2 pieces of info it works fine but I'm getting a delegation warning.  Anyway to alleviate that?

If(
 CountRows(
 Filter('MyDataSource', Year = ThisItem.LYear && MyPerson.Email = ThisItem.MyPerson.Email)
 ) > 1,
 true
 ,false
)

TIA

Categories:
I have the same question (0)
  • Verified answer
    wolenberg_ Profile Picture
    1,331 Super User 2026 Season 1 on at

    The problem it is inside the CountRows Function, this is not delegable

    my recomedation it is store this filtered in a separeted collection, and after do this, you can use the CountRows function inside the collection, something like this:

    ClearCollect(colTemp,Filter('MyDataSource', Year = ThisItem.LYear && MyPerson.Email = ThisItem.MyPerson.Email));
    
    If(
     CountRows(
     colTemp
     ) > 1,
     true
     ,false
    )

     

    -------------------------------------------------------------------

    If my reply helped you, please give a 👍
    If it solved your issue, please give a 👍 & accept it as the Solution to help other community members find it.

  • vffdd Profile Picture
    1,257 Super User 2024 Season 1 on at

    Perfect @wolenberg_  Thank youi

  • vffdd Profile Picture
    1,257 Super User 2024 Season 1 on at

    Thanks @wolenberg_ I spoke too soon ! 🙂 I can see how that would work in some situations however mine is a view gallery so there is no action to do the clear collect and if I do it outside of the gallery then obviously the .thisitem or .thisrecord isn't valid

     

    Any suggestions on how I might get around that?

  • wolenberg_ Profile Picture
    1,331 Super User 2026 Season 1 on at

    In this case @vffdd  , you can use ForAll(GalleryItens) , Collect(Filter) .... doing this you can use ThisRecord.Field to filter inside the ForAll Function, and this can solve the situation for delegation for you.

  • vffdd Profile Picture
    1,257 Super User 2024 Season 1 on at

    Great Thanks

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 549 Most Valuable Professional

#2
Kalathiya Profile Picture

Kalathiya 225 Super User 2026 Season 1

#3
Haque Profile Picture

Haque 224

Last 30 days Overall leaderboard