cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Helper IV
Helper IV

one dropdown to filter options in another dropdown

Hi,

i have a gallery within an app with many filters. how can i make the filters impact each other?

Perez_0-1602792517729.png

 

for example,

1. user selected specific employee name:

1.1 only the courses he registered to, will appear in the courses filter, 

1.2 only the session types of the courses he is registered to, will appear in the session type filter, 

etc.

 

if additional information required i will gladly provide it.

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted

Hi@Perez,

Could you please try the formula I provided again?

I use the Value that represents the value in the filter result rather than the Value() function. As we write formula within the formula bar, it will provide some predicted selections, you should not select the unnecessary selections. For example, when you write Value within it, it will display the predicted Value() function, if you select it, it will make the Value become the Value() function which is completely not the correct syntax.

Please try to write the Value in Concat() rather than the Value() in Concat().

Hope this could help you.

Best Regards,

Qi

View solution in original post

4 REPLIES 4
Highlighted
Helper I
Helper I

Just filter the source of the drop downs using the selected value in the preceding dropdown:

 

UserDropdown Items = [Student Table]

CourseDropdown Items = Filter([EnrolledCourses], StudentID = UserDropdown.Selected.ID)

 

So on and so forth down the line.  Part of this is contingent on how your data is structured, though.

Highlighted
Microsoft
Microsoft

Hi@Perez,

Based on the issue that you mentioned, do you want to create cascading Dropdowns?

Could you please share a bit more about the scenario:

  1. Provide a screenshot about your data source or an example.
  2. How you configure your app?

I agree with @parmiras that all this depends on how you structure the data source.

In my scenario, I create an SP list below.

list.png

If you want to create the cascading Dropdown, you should try the following workaround.

Set the first Dropdown Items property as below:

 

Choices(TestCourse.Tester)

 

Set the second course-related Dropdown  Items property as below:

 

Filter(
    Choices(TestCourse.CourseName),
    Value in Concat(
        Filter(
            TestCourse,
            Tester.Value = Dropdown7.Selected.Value
        ),
        CourseName.Value & ";"
    )
)

 

Note: The Dropdown7 represents the Tester-related Dropdown.

Set the third month-related Dropdown  Items property as below:

 

Filter(
    Choices(TestCourse.Month),
    Value in Concat(
        Filter(
            TestCourse,
            CourseName.Value = Dropdown8.Selected.Value
        ),
        Month.Value & ";"
    )
)

 

Note: The Dropdown8 represents the CourseName-related Dropdown.

Set the fourth year-related Dropdown  Items property as below:

 

Filter(
    Choices(TestCourse.Year),
    Value in Concat(
        Filter(
            TestCourse,
            Month.Value = Dropdown9.Selected.Value
        ),
        Year.Value & ";"
    )
)

 

Note: The Dropdown9 represents the Month-related Dropdown.

And so on as the rest of your Dropdowns. The Dropdowns will be cascading one by one.

Hope this could help you.

Best Regards,

Qi

 

 

Highlighted

Hi @v-qiaqi-msft , @parmiras 

 I tried to implement your suggestions below but didn’t succeeded. this is a sample of my dataset:

Perez_2-1603120081681.png

 

 

In the items property of each dropdown I have a collection which I created on the app start, for example for the testers I have EmplName collection which is running on 4 different columns on the dataset to check the correct context of employees to display.

For example, if I’m a tester I will see my items only (1 record display in the tester dropdown). If I’m group leader I will be able to see all the testers under my responsibility in the testers dropdown, etc.

 

Below for example part of the code:

If(

CountRows(Filter('AQE-Development and Traning Plan List',EmployeeName.Claims=varUser.Claims))>0, ClearCollect(EmplName,Distinct(Filter('AQE-Development and Traning Plan List', EmployeeName.Claims=varUser.Claims), EmployeeName.DisplayName)),

CountRows(Filter('AQE-Development and Traning Plan List',GL.Claims=varUser.Claims))>0,

ClearCollect(EmplName,{Result:"Choose Employee"});

Collect(EmplName,Sort(Distinct(ShowColumns(Filter('AQE-Development and Traning Plan List',GL.Claims=varUser.Claims),"EmployerName"),EmployerName.DisplayName),Result,Ascending)),),Result,Ascending)),

 

varUser is a varaible for the current user.

other collection are more simple and just collecting the data from the table adding the Choose ... as the first item of the dropdown.

 

When trying to implement your suggestions it didn’t worked  please see details in the below screenshot:

Perez_3-1603120081691.png

the value function behaivor is diffrent than the one in your screenshot, it is a function. 

im new to powerapps, so probably im missing somthing, will appriciate your help on this.

If additional details required, I will be happy to provide.

Highlighted

Hi@Perez,

Could you please try the formula I provided again?

I use the Value that represents the value in the filter result rather than the Value() function. As we write formula within the formula bar, it will provide some predicted selections, you should not select the unnecessary selections. For example, when you write Value within it, it will display the predicted Value() function, if you select it, it will make the Value become the Value() function which is completely not the correct syntax.

Please try to write the Value in Concat() rather than the Value() in Concat().

Hope this could help you.

Best Regards,

Qi

View solution in original post

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

News & Announcements

Community Blog

Stay up tp date on the latest blogs and activities in the community News & Announcements.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Community Highlights

Community Highlights

Check out the Power Platform Community Highlights

Top Solution Authors
Top Kudoed Authors
Users online (9,294)