cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
BCLS776
Super User
Super User

Delegation in a Dataverse Date column

Hi All,

I've got a stubborn delegation warning that I am unsure how to handle:

BCLS776_1-1652833199354.png

Here's a clear view of the code, in the Items property of a nested gallery:

With({
    closeDate: DateAdd(DateValue(labFirstSunday.Text), ThisItem.Value, Days), 
    closeDatePlusOne: DateAdd(DateValue(labFirstSunday.Text), ThisItem.Value+1, Days)},
    Filter(Deals,
        ClosingDate >= closeDate,
        ClosingDate < closeDatePlusOne
    )
)

This is a gallery-within-a-gallery to create a calendar to show records from the Deals table by ClosingDate. ClosingDate is a date-only Dataverse column, which should be delegable in this situation. However, I get a warning.

I have tried a nested With() to prefilter the Filter() by the first filtering term, but I still get a delegation warning on that one too.

Any ideas on how to get this one to delegate?

TIA,
Bryan

_________________________________________________________________________________________
Help the community help more users by choosing to "Accept as Solution" if this post met your needs. If you liked the post and want to show some appreciation, please give it a Thumbs Up.
1 ACCEPTED SOLUTION

Accepted Solutions
v-xiaochen-msft
Community Support
Community Support

Hi @BCLS776 ,

 

I made a test and I found that if you use with() function and date field , it will return a delegation warning .

Please see the screenshot:

vxiaochenmsft_0-1653021460369.png

vxiaochenmsft_1-1653021596609.png

 

 

So I tried remove the with() function ,it's wierd that the delegation warning disappeared... and it showed the correct output in the gallery.

vxiaochenmsft_2-1653021631874.png

vxiaochenmsft_3-1653021678560.png

You can see that it returned 2 items .

 

My delegation seeting:

vxiaochenmsft_4-1653021698036.png

 

So I think you could try the formula without with()...

 

Best Regards,

Wearsky

View solution in original post

2 REPLIES 2
v-xiaochen-msft
Community Support
Community Support

Hi @BCLS776 ,

 

I made a test and I found that if you use with() function and date field , it will return a delegation warning .

Please see the screenshot:

vxiaochenmsft_0-1653021460369.png

vxiaochenmsft_1-1653021596609.png

 

 

So I tried remove the with() function ,it's wierd that the delegation warning disappeared... and it showed the correct output in the gallery.

vxiaochenmsft_2-1653021631874.png

vxiaochenmsft_3-1653021678560.png

You can see that it returned 2 items .

 

My delegation seeting:

vxiaochenmsft_4-1653021698036.png

 

So I think you could try the formula without with()...

 

Best Regards,

Wearsky

BCLS776
Super User
Super User

Thanks Wearsky,

Yes, the delegation warning goes away and the app delegates the Filter() properly with your suggested change. I appreciate the response!

Bryan

_________________________________________________________________________________________
Help the community help more users by choosing to "Accept as Solution" if this post met your needs. If you liked the post and want to show some appreciation, please give it a Thumbs Up.

Helpful resources

Announcements
Power Apps News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

Community Call Conversations

Introducing the Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

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