cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
thressac
Frequent Visitor

Distinct Choices

I have a form that will have 3 dropdown fields and have the same values in each of them.  The ask is that the fields cannot have the same value as the other 2 fields.  So, if a user chooses 7:00 am - 8:00 am start, the other two fields will need to display either 8:30am - 9:30 am and 10:00am - 10:30am start. How can I accomplish that?

 

Choice 1

7:00am - 8:00am start

8:30am-9:30am start

10:00am-10:30am start

 

Choice 2

7:00am - 8:00am start

8:30am-9:30am start

10:00am-10:30am start

 

Choice 3

7:00am - 8:00am start

8:30am-9:30am start

10:00am-10:30am start

1 ACCEPTED SOLUTION

Accepted Solutions
Aaron3Sixty5
Helper I
Helper I

If you want to cascade the results top down, you can add the following code to 3 dropdown controls Items property:

 

Dropdown1

["7:00am - 8:00am start", "8:30am-9:30am start", "10:00am-10:30am start"]

 

Dropdown2

If(
    IsBlank(Dropdown1.SelectedText.Value),
    ["7:00am - 8:00am start","8:30am-9:30am start","10:00am-10:30am start"],
    Dropdown1.SelectedText.Value="7:00am - 8:00am start",
    ["8:30am-9:30am start","10:00am-10:30am start"],
    Dropdown1.SelectedText.Value="8:30am-9:30am start",
    ["7:00am - 8:00am start","10:00am-10:30am start"],
    Dropdown1.SelectedText.Value="10:00am-10:30am start",
    ["7:00am - 8:00am start","8:30am-9:30am start"]
)

 

Dropdown3

If(
    //Check for non-selections
    IsBlank(Dropdown1.SelectedText.Value) && IsBlank(Dropdown2.SelectedText.Value),
    ["7:00am - 8:00am start","8:30am-9:30am start","10:00am-10:30am start"],
    Dropdown1.SelectedText.Value="7:00am - 8:00am start" && IsBlank(Dropdown2.SelectedText.Value),
    ["8:30am-9:30am start","10:00am-10:30am start"],
    Dropdown1.SelectedText.Value="8:30am-9:30am start" && IsBlank(Dropdown2.SelectedText.Value),
    ["7:00am - 8:00am start","10:00am-10:30am start"],
    Dropdown1.SelectedText.Value="10:00am-10:30am start" && IsBlank(Dropdown2.SelectedText.Value),
    ["7:00am - 8:00am start","8:30am-9:30am start"],

    //Results for 10:00am start
    (Dropdown1.SelectedText.Value="7:00am - 8:00am start" && Dropdown2.SelectedText.Value="8:30am-9:30am start") || (Dropdown2.SelectedText.Value="7:00am - 8:00am start" && Dropdown1.SelectedText.Value="8:30am-9:30am start"),
    ["10:00am-10:30am start"],
    //Results for 8:30am start
    (Dropdown1.SelectedText.Value="7:00am - 8:00am start" && Dropdown2.SelectedText.Value="10:00am-10:30am start") || (Dropdown2.SelectedText.Value="7:00am - 8:00am start" && Dropdown1.SelectedText.Value="10:00am-10:30am start"),
    ["8:30am-9:30am start"],
    //Results for 7:00am start 
    (Dropdown1.SelectedText.Value="8:30am-9:30am start" && Dropdown2.SelectedText.Value="10:00am-10:30am start") || (Dropdown2.SelectedText.Value="8:30am-9:30am start" && Dropdown1.SelectedText.Value="10:00am-10:30am start"),
    ["7:00am - 8:00am start"]

)

 

dd-example.JPG

View solution in original post

4 REPLIES 4
Drrickryp
Super User
Super User

Hi @thressac 

Filter the list based on the choice <> the first dropdown.  In the example, I used listboxes to show the choices.  The result would be the same for dropdown controls. 

_1.png

@Drrickryp , can you provide an example please?

Aaron3Sixty5
Helper I
Helper I

If you want to cascade the results top down, you can add the following code to 3 dropdown controls Items property:

 

Dropdown1

["7:00am - 8:00am start", "8:30am-9:30am start", "10:00am-10:30am start"]

 

Dropdown2

If(
    IsBlank(Dropdown1.SelectedText.Value),
    ["7:00am - 8:00am start","8:30am-9:30am start","10:00am-10:30am start"],
    Dropdown1.SelectedText.Value="7:00am - 8:00am start",
    ["8:30am-9:30am start","10:00am-10:30am start"],
    Dropdown1.SelectedText.Value="8:30am-9:30am start",
    ["7:00am - 8:00am start","10:00am-10:30am start"],
    Dropdown1.SelectedText.Value="10:00am-10:30am start",
    ["7:00am - 8:00am start","8:30am-9:30am start"]
)

 

Dropdown3

If(
    //Check for non-selections
    IsBlank(Dropdown1.SelectedText.Value) && IsBlank(Dropdown2.SelectedText.Value),
    ["7:00am - 8:00am start","8:30am-9:30am start","10:00am-10:30am start"],
    Dropdown1.SelectedText.Value="7:00am - 8:00am start" && IsBlank(Dropdown2.SelectedText.Value),
    ["8:30am-9:30am start","10:00am-10:30am start"],
    Dropdown1.SelectedText.Value="8:30am-9:30am start" && IsBlank(Dropdown2.SelectedText.Value),
    ["7:00am - 8:00am start","10:00am-10:30am start"],
    Dropdown1.SelectedText.Value="10:00am-10:30am start" && IsBlank(Dropdown2.SelectedText.Value),
    ["7:00am - 8:00am start","8:30am-9:30am start"],

    //Results for 10:00am start
    (Dropdown1.SelectedText.Value="7:00am - 8:00am start" && Dropdown2.SelectedText.Value="8:30am-9:30am start") || (Dropdown2.SelectedText.Value="7:00am - 8:00am start" && Dropdown1.SelectedText.Value="8:30am-9:30am start"),
    ["10:00am-10:30am start"],
    //Results for 8:30am start
    (Dropdown1.SelectedText.Value="7:00am - 8:00am start" && Dropdown2.SelectedText.Value="10:00am-10:30am start") || (Dropdown2.SelectedText.Value="7:00am - 8:00am start" && Dropdown1.SelectedText.Value="10:00am-10:30am start"),
    ["8:30am-9:30am start"],
    //Results for 7:00am start 
    (Dropdown1.SelectedText.Value="8:30am-9:30am start" && Dropdown2.SelectedText.Value="10:00am-10:30am start") || (Dropdown2.SelectedText.Value="8:30am-9:30am start" && Dropdown1.SelectedText.Value="10:00am-10:30am start"),
    ["7:00am - 8:00am start"]

)

 

dd-example.JPG

View solution in original post

@Aaron3Sixty5  this worked like a charm!  thank you!

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Welcome Super Users.jpg

Super User Season 2

Congratulations, the new Super User Season 2 for 2021 has started!

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Users online (1,795)