Skip to main content

Notifications

Community site session details

Community site session details

Session Id : +nSdFPel8xejW3Gl+fYxT/
Power Apps - Building Power Apps
Answered

Help with Not, Does not equal when filtering SharePoint data set

Like (0) ShareShare
ReportReport
Posted on 22 Apr 2025 11:01:45 by 446
I hope someone can help me with a yellow delegation error I am getting when trying to use not equals! 
 
My formula is below:
Sort(
    Filter(
        'Information', 
        'Name of Supervisor'.DisplayName = varUserName &&  
        'Created By'.DisplayName <> varUserName
    ),
    Created,
    SortOrder.Descending
)
It doesn't like the second filter condition.  It's quite happy if I swap <> for = but I want a list of entries where the user is listed as Supervisor BUT they didn't create the record.
 
How can I do this?  I've tried to use NOT, !=, AND with no success!
  • WarrenBelz Profile Picture
    146,660 Most Valuable Professional on 23 Apr 2025 at 21:41:01
    Help with Not, Does not equal when filtering SharePoint data set
    Yes - it was a pretty basic example of pre-filtering to manage Delegation.
  • RM-30040732-0 Profile Picture
    446 on 23 Apr 2025 at 12:36:12
    Help with Not, Does not equal when filtering SharePoint data set
    @WarrenBelz thanks. I tried your method once more and created a new gallery and seems to work now thank you! I wonder if my Power App was just being difficult the first time around!
  • WarrenBelz Profile Picture
    146,660 Most Valuable Professional on 23 Apr 2025 at 11:18:15
    Help with Not, Does not equal when filtering SharePoint data set
    I will not comment further, but for the sake of not misleading future readers of this post, With() in this case is simply a temporary collection and if what you posted works, then it should too. I have updated it to include the Sort as well.
  • RM-30040732-0 Profile Picture
    446 on 23 Apr 2025 at 09:31:56
    Help with Not, Does not equal when filtering SharePoint data set
    @WarrenBelz your method did not work for me I'm afraid
  • WarrenBelz Profile Picture
    146,660 Most Valuable Professional on 23 Apr 2025 at 09:14:12
    Help with Not, Does not equal when filtering SharePoint data set
    You do not need the collection - what I posted does exactly the same thing (pre-filter with a Delegable filter, the output of which is then actioned "locally" to bypass Delegation issues) and does not leave a "one use" collection clogging up the app. It also does not need a "trigger" and can be used directly as a filter. I also have a blog explaining the process.
    If what you posted works, then this should also.
  • RM-30040732-0 Profile Picture
    446 on 23 Apr 2025 at 08:25:52
    Help with Not, Does not equal when filtering SharePoint data set
    Thanks for all your replies -  none worked as written below but I managed to get it working with a combination!
     
    I changed the limit from 500 to 2000.
     
    Added a collection OnVisible property of my screen to first filter where the Name of Supervisor = current user
     
    // Prefilter the list of Applications where the Supervisor listed is the current user
    ClearCollect(colSupervisorApplications,
    Filter('Information','Name of Supervisor'.DisplayName = varUserName))
     
    I then further filtered that collection using the gallery Items property
     
    Sort(
        Filter(
            colSupervisorApplications,
            'Created By'.Email <> varUserEmail
        ),
        Created,
        SortOrder.Descending
    )
     
  • Verified answer
    WarrenBelz Profile Picture
    146,660 Most Valuable Professional on 22 Apr 2025 at 23:30:58
    Help with Not, Does not equal when filtering SharePoint data set
    This will work fine providing you do not have more than 500 records (you can increase this to 2,000) where the name of the Supervisor is varUserName
    With(
       {
          _Data:
          Sort(
             Filter(
                'Information', 
                'Name of Supervisor'.DisplayName = varUserName
             ),
             Created,
             SortOrder.Descending
          )
       },
       Filter(
          _Data,
          'Created By'.DisplayName <> varUserName
       )
    )
     
    Please click Does this answer your question 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 a Like.
    MVP (Business Applications)    Visit my blog Practical Power Apps    LinkedIn    Buy me a coffee
  • Suggested answer
    mmbr1606 Profile Picture
    12,112 Super User 2025 Season 1 on 22 Apr 2025 at 11:17:52
    Help with Not, Does not equal when filtering SharePoint data set
    hey
     
     
     
    does your datasoruce has more than 500 or maximum 2000 entries? If its below that amount (and will never outgrow it) you can ignore the issue.

    you can also try something like this:
    ClearCollect(
       colFilteredData,
       Filter(
          'Information',
          'Name of Supervisor'.DisplayName = varUserName
       )
    );
    
    ClearCollect(
       colFinalData,
       Filter(
          colFilteredData,
          'Created By'.DisplayName <> varUserName
       )
    );
    
    if that works please mark as verified answer
     
     
    cheers
  • Suggested answer
    MS.Ragavendar Profile Picture
    1,597 on 22 Apr 2025 at 11:15:10
    Help with Not, Does not equal when filtering SharePoint data set
     
    (not equals) operator is not delegable when used on a complex (record) column like 'Created By' in SharePoint.
     
    Sort(
        Filter(
            'Information',
            'Name of Supervisor'.Email = varUserEmail &&
            Lower('Created By'.Email) <> Lower(varUserEmail)
        ),
        Created,
        SortOrder.Descending
    )
    
    
     
    Replace varUserEmail with a variable storing the current user's email like:
     
    set(varUserEmail, User().Email)
     
    🏷️ Please tag me @MS.Ragavendar if you still have any queries related to the solution or issue persists.
    âś… Please click Accept as solution if my post helped you solve your issue and help others who will face the similar issue in future.
    ❤️ Please consider giving it a Like, If the approach was useful in other ways.
     

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

🌸 Community Spring Festival 2025 Challenge 🌸

WIN Power Platform Community Conference 2025 tickets!

Markus Franz – Community Spotlight

We are honored to recognize Markus Franz as our April 2025 Community…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,660 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 65,999 Most Valuable Professional

Leaderboard