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 Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

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.

PA.JPG

New Release Planning Portal (Preview)

Check out our new release planning portal, an interactive way to plan and prepare for upcoming features in Power Platform.

Top Solution Authors
Top Kudoed Authors
Users online (2,213)