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 Apps
Answered

Issue with a Query

(0) ShareShare
ReportReport
Posted on by 54

I am trying to use the Filter with an AND operator

 

CountRows(Filter(Onkosten,And(Onkost_x0020_Aanvrager = User().FullName,Status.Value = "Aangevraagd")))

 

This give me back 2.

But i created 3 entries 

 

1 with a different Username (status Aangevraagd)

and 2 with the same usernames (1 with Status "In behandeling (this is another Status) and another with the Status "Aangevraagd")

 

Still when i use the app with the 2 different users i keep getting 2 as a value ... 

 

Any insights ? Am i missing something in my query ?

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

    Hi @BartTechne ,

    Firstly User().FullName is not Delegable, so do this at App OnStart

    Set(gblUserName,User().FullName)

    then try this

    CountRows(
     Filter(
     Onkosten,
     Onkost_x0020_Aanvrager = gblUserName && 
     Status.Value = "Aangevraagd"
     )
    )

     

    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.

  • BartTechne Profile Picture
    54 on at

    Hi, 

    Thanks for the reply.

    I have Entry in "Aangevraagd" as status.value

     

    but the query gives back : 0

    Also when i try to Export gblusername its Empty and my label is empty

  • WarrenBelz Profile Picture
    156,275 Most Valuable Professional on at

    Hi @BartTechne ,

    I do not quite understand your comment on exporting gblUserName - I am simply setting a Variable to the current user's name (which will always work when done at App OnStart) to make the query Delegable.

    This is a very simple basic Filter, so if you have records where the field Onkost_x0020_Aanvrager contains the logged-in user's name and the field Status (which I assume is a Choice field) contains the value "Aangevraagd", then this will count the number of records matching. Is there anything incorrect in the assumptions above?

     

    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.

     

     

     

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

#2
11manish Profile Picture

11manish 153 Super User 2026 Season 2

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 116 Super User 2026 Season 2

Last 30 days Overall leaderboard