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 / Delegation problem whe...
Power Apps
Unanswered

Delegation problem when checking the User().Email = People or group field and Countrows()

(0) ShareShare
ReportReport
Posted on by 3,514

I have the following formula to do a filter :-

 

If.png

 

where the To & Cc are people or group sharePoint fields which allows multiple selection.. but my formula is raising a delegation error.. can anyone advice on this please? now i am storing the User email inside a variable named varUseremail.

Thanks

Categories:
I have the same question (0)
  • Nogueira1306 Profile Picture
    7,390 Super User 2024 Season 1 on at

    Hey! In filters you cant use ||

     

    Try:

     

    If(varItemID > 0, Filter(varDataSource, ID = varItemID),

    SortByColumns(Filter(ProlemForm, 'Created By'.Email = User().Email, ...

     

    If you need additional help please tag me in your reply and please like my reply.
    If my reply provided you with a solution, pleased mark it as a solution ✔️!

    Best regards,
    Gonçalo Nogueira

  • johnjohn123 Profile Picture
    3,514 on at

    @Nogueira1306what is your formual... it is the same as the one i am using!!

  • Nogueira1306 Profile Picture
    7,390 Super User 2024 Season 1 on at

    You cant use || inside a filter.

  • Ram Prakash Duraisamy Profile Picture
    5,877 Super User 2026 Season 1 on at

    Try Using User().Email else go to settings --> change the count for 500 to 2000

    if not working try using FIRSTN or LASTN because Powerapps filter will be based on Performance based.

  • johnjohn123 Profile Picture
    3,514 on at

    @Nogueira1306so there is not way to make my formula delegable ? in other words i can not return the item created by the login user OR the user inside inside the CC or inside the To fields?

    Thanks

  • Nogueira1306 Profile Picture
    7,390 Super User 2024 Season 1 on at

    What you can do is:

    SortByColumns(Filter(ProlemForm, 'Created By'.Email = User().Email, CountRows(Filter( CollectionName, Email = varuseremail),CountRows(Filter( CollectionName, Email = varuseremail)

     

     

    I think your problem is on "To" and "CC"

     

    If you need additional help please tag me in your reply and please like my reply.
    If my reply provided you with a solution, pleased mark it as a solution ✔️!

    Best regards,
    Gonçalo Nogueira

  • RandyHayes Profile Picture
    76,299 Super User 2024 Season 1 on at

    @Nogueira1306 

    Your statement is incorrect - || (OR) and && (AND) are ALL usable in Filters and any other datasource criteria.

    They are preferred over any other logic (like If statements) in criteria.

     

    @johnjohn123 

    Yes - you can make your formula delegable.  But your formula logic is not correct based on what you want.

  • johnjohn123 Profile Picture
    3,514 on at

    @RandyHayes  i want the filter to show the items that are :-

     

    1) Created by the user

    2) OR the user is defined inside the To user

    3) OR inside the Cc users..

     

    so why my formula is not correct?

  • RandyHayes Profile Picture
    76,299 Super User 2024 Season 1 on at

    @johnjohn123 

    Let me refine your statement and tell me if it is correct:

     

    1) Created by the user - Return ALL records in the ProblemForm datasource that were created by the user

    2) OR the user is defined inside the To user - If the user is in the To datasource Return ALL records in the ProblemForm datasource 

    3) OR inside the Cc users.. - If the user is in the Cc datasource Return ALL records in the ProblemForm datasource 

  • johnjohn123 Profile Picture
    3,514 on at

    @RandyHayes  No .. if the user is defined inside the Cc users to only show the items which the user is defined inside the Cc users... same applies to the To!!

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 Launch!

Jump in, show your community spirit, and win prizes!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Valantis Profile Picture

Valantis 494

#2
WarrenBelz Profile Picture

WarrenBelz 352 Most Valuable Professional

#3
11manish Profile Picture

11manish 323

Last 30 days Overall leaderboard