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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Delegation Error in Po...
Power Apps
Unanswered

Delegation Error in Power apps gallery

(0) ShareShare
ReportReport
Posted on by 39

Hi All,

I am using below mentioned formula in gallery to show last visited by column available in SharePoint list, however it is throwing delegation error, can you please help me to eliminate delegation and make it work smoothly?

 

LookUp(
 Visit_Tracker,
 ID = Max(
 Filter(
 Visit_Tracker,
 DID = ThisItem.ID
 ),
 ID
 )
).Visited_By

 

Thanks & Regards,

Sanket 

 

Categories:
I have the same question (0)
  • Rajkumar_M Profile Picture
    3,741 Super User 2025 Season 2 on at

    Hi @Sanket_Katdare 

     

    Create a Collection: In the app's OnStart property or Screen OnVisible wherever you load your data, create a collection that includes the required columns from the SharePoint list.

     

    ClearCollect(
    VisitTrackerCollection,
    Visit_Tracker
    )

     

    Gallery item:

     

    LookUp(
    VisitTrackerCollection,
    ID = Max(
    Filter(
    VisitTrackerCollection,
    DID = ThisItem.ID
    ),
    ID
    )
    ).Visited_By

     

    This approach pre-loads the data into a collection, allowing you to use non-delegable functions like Max and Filter on the collection instead of the SharePoint list, which should resolve the delegation error.

     

    Thanks!

     

    If my response has been helpful in resolving your issue, I kindly request that you consider clicking "Accept as solution" and "giving it a thumbs up" as a token of appreciation.

  • Sanket_Katdare Profile Picture
    39 on at

    Hi Rajkumar,

     

    As you suggested i have created VisitTrackerCollection, also have loaded it and cheked whether it has any data by using First(VisitTrackerCollection).Visited_By in one of the label it worked fine.

    After that i come back to my gallery and applied   Lookup formula in Lable2 as shown below however it is not returning anything  and showing some error in bottom, sharing screenshot, kindly suggest ... 

     

    Sanket_Katdare_1-1695754446095.png

     

     

  • Rajkumar_M Profile Picture
    3,741 Super User 2025 Season 2 on at

    Try this formula in label2 property

     

    Text(
    First(
    Filter(
    VisitTrackerCollection,
    DID = ThisItem.ID,
    ID = Max(Filter(VisitTrackerCollection, DID = ThisItem.ID), ID)
    )
    ).Visited_By
    )

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 796 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 327 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard