cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
New Member

Cascading Dropdown with SharePoint Lookup column

Hello,

 

I am struggling to build a cascading dropdown based on a SharePoint Lookup List:

The SharePoint Lists look like this:

SharePoint_List_Relations.PNG

 

 

 

 

 

 

 

 

 

 

 

The PartFeatures_Material list can be considered as a n to n mapping list.

 

Now I have a first dropdown list which is connected to the PartFeatures List where I can see all available PartFeatures:

Distinct(PartFeatures;Title)

 

In the second dropdown I would like to see all Materials related to my selection on dropdown1. F.e. If I select PF3 at dropdown1, dropdown2 should show me M1,M3,M4

 

In dropdown2 I have the following code:

Filter(PartFeatures_Materials;PartFeature = Dropdown1.Selected.Result)

 

I am not able to see any Material value (I think because its a lookup list and a more complex datatype?)

 

Thank you in advance!

 

Best Regards

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support
Community Support

Re: Cascading Dropdown with SharePoint Lookup column

Hi @ray3 ,

Could you tell me the data type of PartFeature field and Material field in PartFeatures_Material list?

Is your datasource sharepoint list?

If their data type is not text, then the formula should be a little different.

Based on your description, I assume that your data source is sharepoint list and these two fields are choice type(single choice).

If so, please set drop down1's Items:

Choices(PartFeatures_Materials.PartFeature)

set drop down2's Items:

Distinct(Filter(PartFeatures_Materials,PartFeature.Value=Dropdown1.Selected.Value),Material.Value)

Then drop down2's items will filter based on the selection of drop down1.

12162.PNG

 

Best regards,

 

Community Support Team _ Phoebe Liu
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
Highlighted
Advocate IV
Advocate IV

Re: Cascading Dropdown with SharePoint Lookup column

@ray3 

 

First, if you put just PartFeature_Materials as the Items for the second dropdown, do all values appear as expected? 

 

Not sure how large the list is, but maybe you can try pre-loading the SP lists into collections in the App OnStartup

 

ClearCollect(colPartFeatures, 'Part Features');

ClearCollect(colPartFeaturesMaterials, 'PartFeatures_Materials')

then use 

 

Filter(colPartFeaturesMaterials;PartFeature = Dropdown1.Selected.Result)

 

this essentially removes SharePoint from the equation. May not be realistic if the lists are very large.

 

Hope this helps, 

Mike

 

Community Support
Community Support

Re: Cascading Dropdown with SharePoint Lookup column

Hi @ray3 ,

Could you tell me the data type of PartFeature field and Material field in PartFeatures_Material list?

Is your datasource sharepoint list?

If their data type is not text, then the formula should be a little different.

Based on your description, I assume that your data source is sharepoint list and these two fields are choice type(single choice).

If so, please set drop down1's Items:

Choices(PartFeatures_Materials.PartFeature)

set drop down2's Items:

Distinct(Filter(PartFeatures_Materials,PartFeature.Value=Dropdown1.Selected.Value),Material.Value)

Then drop down2's items will filter based on the selection of drop down1.

12162.PNG

 

Best regards,

 

Community Support Team _ Phoebe Liu
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

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Watch Now

Experience what’s next for Power Apps

See the latest Power Apps innovations, updates, and demos from the Microsoft Business Applications Launch Event.

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (7,367)