cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
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

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
Advocate V
Advocate V

@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

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
News & Announcements

Community Blog

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

Power Apps Community Call

Power Apps Community Call- January

Mark your calendars and join us for the next Power Apps Community Call on January 20th, 8a PST

PP Bootcamp Carousel

Global Power Platform Bootcamp

Dive into the Power Platform stack with hands-on sessions and labs, virtually delivered to you by experts and community leaders.

secondImage

Power Platform Community Conference On Demand

Watch Nick Doelman's session from the 2020 Power Platform Community Conference on demand!

Top Solution Authors
Top Kudoed Authors
Users online (5,148)