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 Pages / Remove options from ex...
Power Pages
Unanswered

Remove options from existing dropdown based on other value

(0) ShareShare
ReportReport
Posted on by

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

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 Pages

#1
Jerry-IN Profile Picture

Jerry-IN 71

#2
Fubar Profile Picture

Fubar 62 Super User 2025 Season 2

#3
sannavajjala87 Profile Picture

sannavajjala87 31

Last 30 days Overall leaderboard