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 / Delegation issues with...
Power Apps
Unanswered

Delegation issues with Month Filter

(0) ShareShare
ReportReport
Posted on by 7

I have an app that is used for building permits that I had built out of SharePoint. Inspectors can use the app to enter new permit forms or existing permits if the business already has some. The app uses a filter that uses dropdown menus to sort the permits by the Inspector, the status of the permit form (draft, submitted), month of inspection and year. The Month and Year are filter are from a Date column called inspection date. Some buisiness can apply for new permits months after the first one, so being able to pull up the orignial form to edit was needed.

 

Unfortuantely, I get a delegation warning on the Month part of the formula. Is there a workaround for this?  I was under the impression that the DateTime column was delagatable. I've increased the data row limit from 500 to 2000 in the meantime but will need to find a workaround for this as it's being heavily used now.

 

https://learn.microsoft.com/en-us/connectors/sharepointonline/#power-apps-delegable-functions-and-operations-for-sharepoint

 

delegation_warning.png

 

This is the forumla I am using on the gallery.

 

SortByColumns(Filter('Permit Form',Inspector.Value = InspectorDropdown.Selected.Value, Month('Date of Inspection')=MonthDropdown.Selected.ID, Year('Date of Inspection')=YearDropdown.Selected.Value,  Status.Value = StatusDropdown.Selected.Value, StartsWith(Business,SearchInput1.Text)),"Modified",SortOrder.Descending)
 
These are the drop down boxes that are used to filter the data. The first one is the inspector name.
permit_app.png
 
The onvisible property of the screen uses this formula to give each month an id in order to sort.
 
ClearCollect(collMonths, Table(
  { ID:1, Name:"Jan"}, { ID:2, Name:"Feb"}, { ID:3, Name:"Mar"},
  { ID:4, Name:"Apr"}, { ID:5, Name:"May"}, { ID:6, Name:"Jun"},
  { ID:7, Name:"Jul"}, { ID:8, Name:"Aug"}, { ID:9, Name:"Sep"},
  { ID:10, Name:"Oct"}, { ID:11, Name:"Nov"}, { ID:12, Name:"Dec"}
));

 

Any help would be greatly appreciated.

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

    Hi @bclem ,

    The non-Delegable elements are the Month() and Year() conversion of the date column. The code below may not be a complete solution if the output of the top filter exceeds your Data Row Limit

    With(
     {
     _Data:
     SortByColumns(
     Filter(
     'Permit Form',
     Inspector.Value = InspectorDropdown.Selected.Value, 
     Status.Value = StatusDropdown.Selected.Value, 
     StartsWith(
     Business,SearchInput1.Text
     )
     ),
     "Modified",
     SortOrder.Descending
     )
     },
     Filter(
     _Data,
     Month('Date of Inspection') = MonthDropdown.Selected.ID, 
     Year('Date of Inspection') = YearDropdown.Selected.Value
     )
    )

     

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

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 329 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard