cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Lewkir
Level: Powered On

Delegation How to Avoid it?

I have a few galleries that pull from SharePoint lists and it's pretty essential that they are filtered on the date field.

 

The lists are currently quite small but will likely grow much larger, is there an way around this delegation issue?

 

I thought of using a calculated column to convert each date into a number which are aparently delegatable only to find that calculated columns are not.

 

Perhaps using flow or similar would allow me to fill a field with a number version of the date?

 

Very stuck for ideas now as it seems this is the last major hurdle I need to get over.

 

Cheers,

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Super User
Super User

Re: Delegation How to Avoid it?

@Lewkir 

Typically text columns are a good avenue for avoiding delegation issues on complex types (anything beyond a number usually).  However, as you have noticed, a calculated column does not abide by these rules.

You can, in your App or through a Flow, populate an alternative column with a calculated value.  So, having another BookingsDate as a text column (like bookingDateCalc), but you would be the one putting in the calculation in either your App or in Flow (when a record is created or modified).

 

Also though, like @xzDan suggests - if you don't try to convert and you are looking for an exact filter (i.e. = ) then you can do that with a date to date comparison and skip the delegation issue.

Filter('Rooms Booking List', BookingsDateCalc = DateValue(GanttDateFormat))

Hope this helps some.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up. Solved your problem? - Click on Accept as Solution. Others seeking the same answers will be happy you did.

View solution in original post

6 REPLIES 6
xzDan
Level 8

Re: Delegation How to Avoid it?

You can in fact filter on the date column, althought you have to convert it to text.

 

Try doing Filter(<Source>,<Date Column> = Text(<Date to Filter>,DateTimeFormat.ShortDate))

Instead of SHortDate you can do Text(,"yyyy-mm-dd") I think which works better.

 

E.g. for me

 

Filter(<Source>,Date=Text(Combo_Date.SelectedDate,"yyyy-mm-dd"))

Lewkir
Level: Powered On

Re: Delegation How to Avoid it?

Hi Dan,

 

Yeah I've used:

 

Filter('Rooms Booking List', Text(BookingsDateCalc) = Text(GanttDateFormat))

which is filtering a SharePoint list on the date column "BookingsDateCalc" by a date picker "GanttDateFormat".

 

This still gives me the delegation warning unfortunately.

xzDan
Level 8

Re: Delegation How to Avoid it?

Can you try without converting the Date column to text? Like with mine, I keep the date column unchanged and just convert the filter to text.

Highlighted
Super User
Super User

Re: Delegation How to Avoid it?

@Lewkir 

Typically text columns are a good avenue for avoiding delegation issues on complex types (anything beyond a number usually).  However, as you have noticed, a calculated column does not abide by these rules.

You can, in your App or through a Flow, populate an alternative column with a calculated value.  So, having another BookingsDate as a text column (like bookingDateCalc), but you would be the one putting in the calculation in either your App or in Flow (when a record is created or modified).

 

Also though, like @xzDan suggests - if you don't try to convert and you are looking for an exact filter (i.e. = ) then you can do that with a date to date comparison and skip the delegation issue.

Filter('Rooms Booking List', BookingsDateCalc = DateValue(GanttDateFormat))

Hope this helps some.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up. Solved your problem? - Click on Accept as Solution. Others seeking the same answers will be happy you did.

View solution in original post

Lewkir
Level: Powered On

Re: Delegation How to Avoid it?

Cheers for the advice.

 

In the end I have used a SharePoint Designer workflow to copy BookingsDateCalc into a further column where it is formatted as a number (I tried Flow but couldn't work it out) so it now works.

 

Cheers.

Super User
Super User

Re: Delegation How to Avoid it?

@Lewkir  good old SharePoint designer - its days are numbered, but it still works well in some cases.

 

I would take the time though to try to figure out how to do the same in Flow as that is the future for a lot of this.

 

Cheers back!

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up. Solved your problem? - Click on Accept as Solution. Others seeking the same answers will be happy you did.

Helpful resources

Announcements
firstImage

Microsoft Business Applications Virtual Launch Event

Join us for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

FirstImage

Power Platform World Tour

Coming to a city near you

thirdimage

PowerApps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

FourthImage

Join PowerApps User Group!!

Connect, share, and learn with your peers year-round

Top Kudoed Authors
Users Online
Currently online: 77 members 3,783 guests
Please welcome our newest community members: