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 Platform Community / Forums / Power Pages / Remove options from ex...
Power Pages
Answered

Remove options from existing dropdown based on other value

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

Hi,

I Have 2 fields that not connected to each other (both are a dropdown lists) and I want to have the below code:

If Datacardvalue8 = "REVENUE" than remove 1 of the options from other datacardvalue9(dropdown fields that contains 4 options but I want to show only 3 based on datacardvalue8 selection)

Picture attached - want to remove the "C_BOM" option when REVENUE is selected

 

Thanks 

Almog

 

 

Categories:
I have the same question (0)
  • Verified answer
    v-yujincui-msft Profile Picture
    Microsoft Employee on at

    Hi @amoshe2 ,

     

    Do you want to filter a dropdown based on the content of another dropdown?

    I have made a test for your reference.

     

    1. Here is my SharePoint List.

    vyujincuimsft_0-1643091244017.png

    2. Select the Drop Down Control and apply the following formula on it Items property as:

    Choices([@DropDownTest].D1)

    3. Select another Drop Down Control and apply the following formula on it Items property as:

    Switch(Dropdown1.Selected.Value,
    "REVENUE1",Filter(Choices([@DropDownTest].D2),Value<>"C_BOM1"),
    "REVENUE2",Filter(Choices([@DropDownTest].D2),Value<>"C_BOM2"),
    "REVENUE3",Filter(Choices([@DropDownTest].D2),Value<>"C_BOM3"),
    "REVENUE4",Filter(Choices([@DropDownTest].D2),Value<>"C_BOM4"),
    Choices([@DropDownTest].D2)
    )

    Result:

    DropDownTest.gif

     

    Best Regards,

    Charlie Choi

     

  • Christian Leverenz Profile Picture
    1,214 on at

    Hi @amoshe2 ,

     

    when this is a portal related question, you have two choices. Either

    • you create a kind of mapping (preferrable as a js-object) and attach a changhadler via jQuery to the driving listbox. When a change occurs, you hide or remove those options in the targetlistbox, which are not used also via jQuery.
    • you create a pcf that gets the input from the firstlistbox and a kind of mapping and renders itself depending on the referenced value. I am just starting with that ideas but this is, what PCF could be good for 🙂

    Does this point in the right direction or has @v-yujincui-msft already neiled it as a power app problem?

     

    Have fun,

      Christian

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Pages

#1
rezarizvii Profile Picture

rezarizvii 61

#2
Valantis Profile Picture

Valantis 46

#2
11manish Profile Picture

11manish 46

Last 30 days Overall leaderboard