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

filter a dropdown

(0) ShareShare
ReportReport
Posted on by 36

We have seleted project 1000.  Where two resources are aleady  part of it (Resource a Developer, Resource 2 a facilatator).

 

We have 4 roles (Developer, Facilatator, Content, Project Lead)

 

I have a gallery to add Resource to the project.  We a resource is added I would like the role dropdown not to display the role the Resource was already used.  

 

For the first entry Resource 1  the role dropdown should be Facilatator, Content, Project Lead.  (Developer was already used)

For the second entry Resource 1  the role dropdown should be Facilatator, Project Lead.  (Developer  & Content are already used)

For the third entry Resource 3  the role dropdown should be Facilatator, Content, Project Lead, Develper.  (No roles have been used)

 

For the life of me I can't figure it out.

 

Many thanks

 

 

PArboucher_0-1707794649808.png

 

 

 

 

 

Categories:
  • Verified answer
    Adrian_Celis Profile Picture
    1,652 Moderator on at

    Hi @PArboucher 

    First, you need to change your Roles dropdown in your gallery into a combobox instead. We will need that later because it retains the selected value even if the choices are gone.

    Lets assume your Resource Dropdown is called Dropdown1 and your Roles Combobox is called Combobox1

    Adrian_Celis_0-1707905886179.png

    You have to create a collection like this first:

    ClearCollect(collAvailableRoles,
    Table({Resource: "Resource 1",Role: "Developer"},{Resource: "Resource 1",Role: "Facilatator"},{Resource: "Resource 1",Role: "Content"},{Resource: "Resource 1",Role: "Project Lead"},{Resource: "Resource 2",Role: "Developer"},{Resource: "Resource 2",Role: "Facilatator"},{Resource: "Resource 2",Role: "Content"},{Resource: "Resource 2",Role: "Project Lead"})
    )

    Then on your Combobox1, change the following properties.

    Items property

    Filter(collAvailableRoles,Resource = Dropdown1.Selected.Value)


    OnChange property

    RemoveIf(collAvailableRoles,Resource = Dropdown1.Selected.Value And Role = Self.Selected.Role);
    If(!IsBlank(varLastRole),
    Collect(collAvailableRoles,{Resource:Dropdown1.Selected.Value,Role:varLastRole})
    );

    OnSelect property

    UpdateContext({varLastRole:Self.Selected.Role});

     SelectMultiple property

    false

     

    Let me know if this works.

  • PArboucher Profile Picture
    36 on at

    hot **bleep** - it got me 98% of the there.  Just need to add a delete icon to the gallery & add the "deleted" role back to the collection!

    Thanks!!  

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
11manish Profile Picture

11manish 394 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 328

#3
WarrenBelz Profile Picture

WarrenBelz 324 Most Valuable Professional

Last 30 days Overall leaderboard