cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
mp6
Helper I
Helper I

Properly set delegation formula not delegating

I haven't seen any posts with similar issues...

I have a completely delegable function:

ClearCollect(RouteInfo7,Filter('HB Orders',DateID=SelectedRoute));
'HB Orders' is a SharePoint list, and  the DateID field and SelectedRoute are both numbers.
 
However, the function is not delegating! I know this for a fact because I changed the non-delegation collection limit to 1, and it only loaded one row. Its causing the app to be extremely slow to start.

Any suggestions or clues why this would be the case?
1 ACCEPTED SOLUTION

Accepted Solutions

@mp6 ,

It is . . . . but you are making a collection, which is not.

If you really want to confirm that two numeric values are Delegable, go back to the start on your Gallery

Set(SelectedRoute,ThisItem.DateID)

then put this in another gallery

Filter(
   'HB Orders',
   DateID=SelectedRoute
)

set your limit to 1 and see how many rows you get in your gallery. Also you might have a read of this blog on mine on Delegation. I assume you are not now running this at App OnStart?

 

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.

Visit my blog Practical Power Apps

 

View solution in original post

27 REPLIES 27
WarrenBelz
Super User
Super User

Hi @mp6 ,

Firstly, what is your Data Source?

The code you posted is Delegable in SharePoint, but nothing is Delegable in Excel (which does not understand what the word means)

 

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.

Visit my blog Practical Power Apps

Ramole
Super User
Super User

Hi @mp6 

Try this 

Filter('HB Orders',DateID= Value(SelectedRoute))
Thank you
If this post helps, then Click on the Thumbs Up below. and Accept it as the solution . to help others find helpful.

The data source is SharePoint list

mp6
Helper I
Helper I

Hi, thanks for your suggestion. It doesn't collect anything now (not even 1)

Hi, thanks for your suggestion. It doesn't collect anything now (not even 1

 

ClearCollect(RouteInfo7,Filter('HB Orders',DateID= Value(SelectedRoute))

 

Thank you
If this post helps, then Click on the Thumbs Up below. and Accept it as the solution . to help others find helpful.

Thanks.

Error... did you mean to put two "Filter" twice?

@WarrenBelz I took out the second filter, but its still not delegating (only collecting my non delegation limit)

@Ramole Actually, it does collect, but it's still not delegating (only collects what my limit is set to)

Helpful resources

Announcements
PA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.

Microsoft Build 768x460.png

Microsoft Build is May 24-26. Have you registered yet?

Come together to explore latest innovations in code and application development—and gain insights from experts from around the world.

May UG Leader Call Carousel 768x460.png

What difference can a User Group make for you?

At the monthly call, connect with other leaders and find out how community makes your experience even better.

Top Solution Authors
Top Kudoed Authors
Users online (1,113)