Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Apps - Building Power Apps
Unanswered

Filter a Dropdown to remove already selected options

(0) ShareShare
ReportReport
Posted on by 30

Dear all,
I have to implement the following:
I have created a SP list named "FILTER list" with a choice column named "Timeslot" that have the following 3 options - 9am, 10am and 11am.
The form is an integrated PowerApps form.

I would like to remove the already selected options from the list. For eg. if I add a new entry with the option "9am" I would like to be removed from the dropdown list and to only show the other remaining options which are "10am" & "11am". (please see images for better clarification down below)

Elizapnt_1-1700208761968.png

After

Elizapnt_2-1700208982832.png

Form:

Elizapnt_3-1700209034486.png


Thank you! Your help is very appreciated.

  • CU22021857-0 Profile Picture
    30 on at
    Re: Filter a Dropdown to remove already selected options

    Hi, in case somebody will ever need this, I managed to adjust it by my own:

    In PowerApps for the dropdown control:

     

    OnSelect:
    ClearCollect(col_Available_times,
    {SlotTime:"9am",booked:LookUp('FILTER list',TimeSlot.Value = "9am").TimeSlot.Value},
    {SlotTime:"10am",booked:LookUp('FILTER list',TimeSlot.Value = "10am").TimeSlot.Value},
    {SlotTime:"11am",booked:LookUp('FILTER list',TimeSlot.Value = "11am").TimeSlot.Value}
    )

    Items:
    Distinct(Filter(col_Available_times,IsBlank(booked)),SlotTime)

  • CU22021857-0 Profile Picture
    30 on at
    Re: Filter a Dropdown to remove already selected options

    @WarrenBelz alright. Thank you for the responses !

  • WarrenBelz Profile Picture
    146,658 Most Valuable Professional on at
    Re: Filter a Dropdown to remove already selected options

    Hi @Elizapnt ,

    No idea sorry - there is only one way of doing this is you want to use a Choice field - otherwise you could hard-code the choices in Power Apps and do something like this (replace with your choices)

    With(
     {
     _Choices: 
     [
     "Alpha",
     "Bravo",
     "Charlie",
     "Delta",
     "Echo"
     ]
     },
     Filter(
     _Choices,
     !(Value in ThisItem.Timeslot.Value)
     )
    )

     

    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.

    MVP (Business Applications)   Visit my blog Practical Power Apps

     

  • CU22021857-0 Profile Picture
    30 on at
    Re: Filter a Dropdown to remove already selected options

    @WarrenBelz - Choice column - single value.
    Yes, it is on the same record.
    In my previous post I noticed that it works fine when I preview it on PowerApps but when I return in the SP list form and select an item, it doesn't apply anymore.
    Seems like it has something to do with the scope?

  • WarrenBelz Profile Picture
    146,658 Most Valuable Professional on at
    Re: Filter a Dropdown to remove already selected options

    @Elizapnt ,

    I assume Timeslot is a Choice column in SharePoint - is it single or multiple value ? Also I asked whether you were testing the same record that the existing value is in - can you please confirm this. I also assume that the Combo Box is on a Form querying that record.

  • CU22021857-0 Profile Picture
    30 on at
    Re: Filter a Dropdown to remove already selected options

    Hi again @WarrenBelz , just noticed that the filter seems to work fine on the form in PowerApps when I preview it but when I return to the SP list form it doesn't work anymore.
    Do you have any idea why ? 
    Thank you for your help!

    Elizapnt_0-1700214227436.png

    Elizapnt_1-1700214524947.png

     

  • CU22021857-0 Profile Picture
    30 on at
    Re: Filter a Dropdown to remove already selected options

    @WarrenBelz , yes on the "TimeSlot" column that I created in my SP list.
    I noticed this in my formula and although it's not retrieving an error I am getting this message:

    Elizapnt_0-1700213809306.png

     

  • WarrenBelz Profile Picture
    146,658 Most Valuable Professional on at
    Re: Filter a Dropdown to remove already selected options

    @Elizapnt ,

    I just tested it here on both single selection and multiple selection choice fields and it worked exactly as expected on both. I assume you are testing this on the same record the selection is being made on.

  • CU22021857-0 Profile Picture
    30 on at
    Re: Filter a Dropdown to remove already selected options

    Hi @WarrenBelz , thank you for your quick input.
    I did the following but it does not change anything. The options are still available in the list although they are being selected.
    I used the following in my PowerApps form in the Items:
    Filter(
    Choices([@'FILTER listt'].TimeSlot),
    !(Value in ThisItem.TimeSlot.Value)
    )

    Elizapnt_1-1700211025980.png

     

    Elizapnt_0-1700210970086.png

     

  • WarrenBelz Profile Picture
    146,658 Most Valuable Professional on at
    Re: Filter a Dropdown to remove already selected options

    HI @Elizapnt ,

    When you refer to "already selected", I assume you mean in the current record ? If so (and I assume this is a Choice field), it should be something like

    Filter(
     Choices('FILTER list'.Timeslot),
     !(Value in ThisItem.Timeslot.Value)
    )

     

    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.

    MVP (Business Applications)   Visit my blog Practical Power Apps

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,658 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