cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
amko77
Level: Powered On

Powerapps Cascading dropdown list from choice column

Hi,

 

I want to make cascading dropdown on my sharepoint list.

I have first two column like choice columns into same sharpoint list/powerapps application.

First choice column is simple with 10 data values but second have 100 values.

 

When I choose one data value in first choice column like something1 I want that my choice automaticly filter about 10 data values in second Choice column which are related to the selection from choice column1.

Example:

choice column1: choose "apple"

Choice column2: automaticly filter "red", "green"...

I was manually add data red, green and in formula I want to manually add data string for filtering into formula because Choice column 2 contains a bunch of data.

 

Or can I make filter through the initial word into Choice column2 for example:

Red tree apple - filter just Red for cascading dropdown result?

 

Best regards,

Amir

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support Team
Community Support Team

Re: Powerapps Cascading dropdown list from choice column

Hi @amko77 ,

 

My understanding is that you want to filter the choices in 2nd choice column with the selection of 1st choice column.

 

If so, please set below formula in the Items property of the dropdown control for 2nd choice column's data card.

If(Dropdown1.Selected.Value="apple",FirstN(Choices(ListName.Choice2),5),Dropdown1.Selected.Value="banana",LastN(FirstN(Choices(ListName.Choice2),7),2))

This formula means that if you select "apple" from column1, then the choices for column2 would be the first 5 options. If you select "banana" from column1, then the choices for column2 would be the6th and 7th values.

 

For more information about If, FirstN and LastN functions in PowerApps, please refer to:

https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/functions/function-first-last

https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/functions/function-if

 

Regards,

Mona

 

Community Support Team _ Mona Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
Community Support Team
Community Support Team

Re: Powerapps Cascading dropdown list from choice column

Hi @amko77 ,

 

My understanding is that you want to filter the choices in 2nd choice column with the selection of 1st choice column.

 

If so, please set below formula in the Items property of the dropdown control for 2nd choice column's data card.

If(Dropdown1.Selected.Value="apple",FirstN(Choices(ListName.Choice2),5),Dropdown1.Selected.Value="banana",LastN(FirstN(Choices(ListName.Choice2),7),2))

This formula means that if you select "apple" from column1, then the choices for column2 would be the first 5 options. If you select "banana" from column1, then the choices for column2 would be the6th and 7th values.

 

For more information about If, FirstN and LastN functions in PowerApps, please refer to:

https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/functions/function-first-last

https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/functions/function-if

 

Regards,

Mona

 

Community Support Team _ Mona Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

amko77
Level: Powered On

Re: Powerapps Cascading dropdown list from choice column

Thank you.

 

Best regards,

Amir

Helpful resources

Announcements
thirdimage

Power Apps Super User Class of 2020

Check it out!

thirdimage

New Badges

Check it out!

thirdimage

Power Apps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

SecondImage

Difinity Conference

The largest Power BI, Power Platform, and Data conference in New Zealand

Top Solution Authors
Top Kudoed Authors
Users online (4,714)