web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Help with delegation i...
Power Apps
Answered

Help with delegation issue

(0) ShareShare
ReportReport
Posted on by 42

I am new to building apps and I am trying to find a work around for a delegation issue. I want a gallery to show records created within the last 7 days, and that the column TrailerNum is not blank.  The following is my code, there may be a much easier way. Any help is much appreciated

 

SortByColumns(

    Filter(

        'WeightTrailerLog.2',

        Created >= DateAdd(

            Today(),

            -7,

            Days

        ), !IsBlank(TrailerNum),

        StartsWith(

            Model,

            TextSearchBox2.Text

        )

    ),

    "Created"

)

Categories:
I have the same question (0)
  • mdevaney Profile Picture
    29,991 Moderator on at
    @Melissaed26
    Can you please share a screenshot of your code in the top formula bar. It will show where specifically the delegation issue is by underlining the code in blue. I have a good idea of where the issues are but a screenshot will make sure 100% of the problem is solved and I don’t miss anything.
  • Melissaed26 Profile Picture
    42 on at

    Thank you for your reply! Here is the code

     

    delegation.JPG

  • CU-18081211-6 Profile Picture
    9,272 Moderator on at

    Maybe i missed this info, but is your datasource a SharePoint list?

    If the answer is Yes, i think you cannot avoid this delegation issue and also the warning message for bolded reason/condition (filter not supported for Date type).

    SortByColumns(

        Filter(

            'WeightTrailerLog.2',

            Created >= DateAdd(

                Today(),

                -7,

                Days

            ), !IsBlank(TrailerNum),

            StartsWith(

                Model,

                TextSearchBox2.Text

            )

        ),

        "Created"

    ).

     If there are not more than 2000 records expected, I proposed you to create an (let's say) temp collection which gather the results of a filter without the DATE part (which will run on the server side) and then to re-filter this collection with DATE part (which will run on the local side).

    Of course, it is best to run all filters on the server side, but i'm afraid that your problem need to be filtered also locally.

     

    Thx ! 

  • Verified answer
    mdevaney Profile Picture
    29,991 Moderator on at
    @gabibalban is correct that dates cannot be delegated in SharePoint (yet).

    Check out this post by RandyHayes for more details on how you might be able to get around it using Flow
    https://powerusers.microsoft.com/t5/Building-Power-Apps-Formerly/Problems-with-delegation-when-filtering-by-date/td-p/319796
  • RezaDorrani Profile Picture
    12,145 on at

    @Melissaed26 

     

    Date columns in SharePoint do not support delegation (This will be supported in Q1 of 2020 as per MS Ignite information)

     

    For now your best bet would be to try the following

    https://www.youtube.com/watch?v=eCMuXPI1Qok

     

    --------------------------------------------------------------------------------
    If this post helps answer your question, please click on “Accept as Solution” to help other members find it more quickly. If you thought this post was helpful, please give it a Thumbs Up.

     

     

  • Melissaed26 Profile Picture
    42 on at

    Ok I used the video to handle the date issue and removed the delegation issue from that, but I still have one on the portion of the formula that is to only pull records that trailerNum is not blank.

  • Melissaed26 Profile Picture
    42 on at

    delegation.JPG

  • RezaDorrani Profile Picture
    12,145 on at

    Hi @Melissaed26 

     

    Assuming TrailerNum is a Number field

     

    Use

    TrailerNum<>Blank()

     

    --------------------------------------------------------------------------------
    If this post helps answer your question, please click on “Accept as Solution” to help other members find it more quickly. If you thought this post was helpful, please give it a Thumbs Up.

  • Melissaed26 Profile Picture
    42 on at

    @RezaDorrani Thank you for replying, yes that is my column name. I need only records with column not blank. THe purpose of that gallery is for a department to very trailer numbers. So they need to see only items that have trailer numbers. 

     

     

    I have not figured out another way to write that code. 

     

    melissa

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    That's a great post by @RandyHayes  thanks for sharing @mdevaney 

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 392 Most Valuable Professional

#2
11manish Profile Picture

11manish 136 Super User 2026 Season 2

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 109 Super User 2026 Season 2

Last 30 days Overall leaderboard