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 / Filter or remove disab...
Power Apps
Unanswered

Filter or remove disabled users in the environment

(0) ShareShare
ReportReport
Posted on by 3

Hi!

I am working in a model driven app. When we are assigning a task from the task-table to someone i want to only get a list over the people who are active in the current environment.

 

I've set a security group for the environment to limit access to only people within that security group. But when i want to choose an owner of a task i can choose between everyone in the organisation. 

 

When i check the users who are in the environment i see that everyone is there, but the only difference is that those who are in the security group is "Active" and the ones who are not is "Disabled". 

Problem is i cant filter on that in the User table. 

 

Any suggestions?

PrebenF_0-1683713917098.png

 

I have the same question (0)
  • Federico Pelliccia Profile Picture
    143 on at

    So, if I understand correctly, you would filter the lookup showing only active (not disabled) Users, right?
    If so, you can use a custom javascript code 
    addCustomFilter (Client API reference) in model-driven apps - Power Apps | Microsoft Learn
    There you can see an example. With that, you can write something like

     

    <filter>
     <condition attribute='isdisabled' operator='eq' value='0' />
    </filter>

    But remember that you have to use this method passing before the addPreSearch on onLoad method of your javascript
    addPreSearch (Client API reference) in model-driven apps - Power Apps | Microsoft Learn

  • Verified answer
    Ethan_009 Profile Picture
    4,838 Moderator on at

    Hi @PrebenF ,

     

    There's another method, 

    Open the Form and click on the Lookup Field

    You will see the View that is used on that Lookup, you can set to 'Active Users' or any custom views as per your choice.

     

    Hope this helps

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