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 / AddColumns is raising ...
Power Apps
Unanswered

AddColumns is raising delegation warning although i am filtering based on ID numeric field

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

I have this formula:

 

Clear(colWOSPD);
ForAll(
 colWOSP As wosp,
 Collect(
 colWOSPD,
 Filter(
 'Work Orders Spare Part Details',
 'Work Order Spare Part ID' = wosp.ID And SparePartApprovalStatusSync="Approved"
 )
 )
);

Sum(AddColumns(colWOSPD As cd, "PriceHidden", If(IsBlank(LookUp('Spare Parts',ID=LookUp('Work Orders Spare Parts',ID=cd.'Work Order Spare Part ID').'Spare Part ID').Price),0,LookUp('Spare Parts',ID=LookUp('Work Orders Spare Parts',ID=cd.'Work Order Spare Part ID').'Spare Part ID').Price)), PriceHidden);

 

but the AddColumns() is raising this delegation warning, although i am filtering based on ID numberic field:

 

johnjohnPter_0-1705340465314.png

 

 

 

any advice , how to solve the delegation ?

Categories:
I have the same question (0)
  • WarrenBelz Profile Picture
    153,051 Most Valuable Professional on at

    @johnjohnPter ,

    The Delegation warning is actually the relational Lookup

    LookUp(
     'Spare Parts',
     ID = 
     LookUp(
     'Work Orders Spare Parts',
     ID = cd.'Work Order Spare Part ID'
     ).'Spare Part ID'
    ).Price

    SharePoint is not a Relational Database and does not support this functionality. How big are the lists 'Spare Parts' and 'Work Orders Spare Parts' ?

  • johnjohnPter Profile Picture
    1,811 Super User 2024 Season 1 on at

    @WarrenBelz spare parts can have more than 2000 items. work orders can grow much more , we have around 100 work orders added each working day.

  • WarrenBelz Profile Picture
    153,051 Most Valuable Professional on at

    @johnjohnPter ,

    You cannot use your current structure in a Delegable manner if neither list is under your limit. The below is my best effort (I cannot test it) on an alternative structure.

    With(
     {
     _Data1:
     Ungroup(
     ForAll(
     colWOSPD As _cd,
     Filter(
     'Work Orders Spare Parts',
     ID = _cd.'Work Order Spare Part ID'
     )
     ),
     "Value"
     )
     },
     With(
     {
     _Data2:
     Ungroup(
     ForAll(
     _Data1 As _Part,
     Filter(
     'Spare Parts',
     ID = _Part.'Spare Part ID'
     )
     ),
     "Value"
     )
     },
     Sum(
     _Data2,
     Price
     )
     )
    ) 			

     

    Please click Accept as solution 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 Thumbs Up.

    MVP (Business Applications)   Visit my blog Practical Power Apps

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 711 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 319 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard