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 a Dropdown to r...
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.

Categories:
I have the same question (0)
  • WarrenBelz Profile Picture
    153,034 Most Valuable Professional on at

    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

  • CU22021857-0 Profile Picture
    30 on at

    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
    153,034 Most Valuable Professional on at

    @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

    @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

     

  • CU22021857-0 Profile Picture
    30 on at

    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

     

  • WarrenBelz Profile Picture
    153,034 Most Valuable Professional on at

    @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

    @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
    153,034 Most Valuable Professional on at

    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

    @WarrenBelz alright. Thank you for the responses !

  • CU22021857-0 Profile Picture
    30 on at

    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)

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