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

Filter one dropdown values based on another dropdown selected value.

Hi Community,
I have one variable -
Set(VarTime,["8 am","9 am","10 am","11 am","12 pm","1 pm","2 pm","3 pm","4 pm","5 pm","6 pm","7 pm","8 pm","9 pm","10 pm"])

Untitled.png

So in drop_down_1  items will be the values of the variable, But in drop_down_2  I want to show the items which are after the selected value of first drop down.
EX: User selected 2pm in first drop down so in second drop down I want to show from 3pm - 10 pm.
Can anyone please tell me how can I achieve this?

1 ACCEPTED SOLUTION

Accepted Solutions
Super User III
Super User III

Hi @powerprithwis ,

Do this collection - screen OnVisible should work

ClearCollect(
    colTime,
    {Timex: "8 am", RowNo:1},
    {Timex: "9 am",RowNo:2},
    {Timex: "10 am",RowNo:3},
    {Timex: "11 am",RowNo:4},
    {Timex: "12 pm",RowNo:5},
    {Timex: "1 pm",RowNo:6},
    {Timex: "2 pm",RowNo:7},
    {Timex: "3 pm",RowNo:8},
    {Timex: "4 pm", RowNo:9},
    {Timex: "5 pm", RowNo:10},
    {Timex: "6 pm", RowNo:11},
    {Timex: "7 pm", RowNo:12},
    {Timex: "8 pm", RowNo:13},
    {Timex: "9 pm", RowNo:14},
    {Timex: "10 pm", RowNo:15}
)

The Items of your first combo box is

colTime

If necessary, edit the box on the right and make sure it displays Timex (Time is a reserved word)

The Items of the second combo box is

Filter(
    colTime,
    RowNo > YourFirstComboBox.Selected.RowNo
)

 

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.

 

View solution in original post

2 REPLIES 2
Super User III
Super User III

Hi @powerprithwis ,

Do this collection - screen OnVisible should work

ClearCollect(
    colTime,
    {Timex: "8 am", RowNo:1},
    {Timex: "9 am",RowNo:2},
    {Timex: "10 am",RowNo:3},
    {Timex: "11 am",RowNo:4},
    {Timex: "12 pm",RowNo:5},
    {Timex: "1 pm",RowNo:6},
    {Timex: "2 pm",RowNo:7},
    {Timex: "3 pm",RowNo:8},
    {Timex: "4 pm", RowNo:9},
    {Timex: "5 pm", RowNo:10},
    {Timex: "6 pm", RowNo:11},
    {Timex: "7 pm", RowNo:12},
    {Timex: "8 pm", RowNo:13},
    {Timex: "9 pm", RowNo:14},
    {Timex: "10 pm", RowNo:15}
)

The Items of your first combo box is

colTime

If necessary, edit the box on the right and make sure it displays Timex (Time is a reserved word)

The Items of the second combo box is

Filter(
    colTime,
    RowNo > YourFirstComboBox.Selected.RowNo
)

 

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.

 

View solution in original post

Hey @WarrenBelz 

Thanks a lot,
Its worked like miracle.

Helpful resources

Announcements
New Badges

New Solution Badges!

Check out our new profile badges recognizing authored solutions!

New Power Super Users

Congratulations!

We are excited to announce the Power Apps Super Users!

Power Apps Community Call

Power Apps Community Call: February

Did you miss the call? Check out the Power Apps Community Call here.

Microsoft Ignite

Microsoft Ignite

Join digitally, March 2–4, 2021 to explore new tech that's ready to implement. Experience the keynote in mixed reality through AltspaceVR!

Top Solution Authors
Top Kudoed Authors
Users online (20,983)