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

Cascading Combo Box with Filter based on Lookup Fields

I am trying to create a cascading combox box (multiple select) based on the look up field and I can't seem to get this working.  Any guidance /help would really helpful.

 

 

I need to cascade Demises based on the Property selected.  In this list both Property and Demise are the lookup fields coming from two different lists.

 

I tried to created a custom combo box but getting an error.  It worked once when I provivded field.Id instead of Value but now it is not working.  

 

cascading isuue.png

 

It is working with the dropbox list (single value select) but giving the same error (cannot be evaluated remotely..).  I need a combo box or lis to select multiple values.

 

Also, how do I save the values back to the list.  Thanks

 

 

2 REPLIES 2
Community Support Team
Community Support Team

Re: Cascading Combo Box with Filter based on Lookup Fields

 

Hi @smerchant,

 

I think your requirement to update multiple selected lookup column with Filter based on Lookup fields cannot be achieved. But I think it could be achieved with single selection.

 

May I know where did you get the information of these 2 Lookup columns? Is it from the same SharePoint list or another one? If it is from another list, please also add this list to the data source list in the app. In my example, the source list name is List_Test and the list to update is List.

 

1. Add a dropdown1 control, set its Items property to:  List_Test  Value to: Name

2. Add another dropdown2 control, set Items property to:

 

Filter(List_Test,Name=Dropdown1.Selected.Value).Title

 

Then, in Dropdown2 control, it will only shows the value from Name column with Filter based on dropdown1.

3. To update List lookup column with dropdown 2, you will need to use Patch function. 

 

Patch(List,
         Defaults(List),
        {Lookup:{'@odata.type':"#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference",
                        Id:Dropdown2.Selected.ID,
                        Value:Dropdown2.Selected.Title}
              }
         )

 

 

For patch usage with lookup field, we need to patch a record rather than a value. And this is the part that multiple selected lookup won't work. The Record must match the Schema defined under your lookup field. 

 

 

Another thread for reference:

Manually set lookup column in new SharePoint list item

 

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.
smerchatn
Level: Powered On

Re: Cascading Combo Box with Filter based on Lookup Fields

Thanks  for this @v-monli-msft.  The data is coming from the SharePoint lists.  For example, List B has a Look up from List A.  List C has a lookup from List B. I am trying to customise List C form where there are two look up columns (from List B). 

 

I think what you are suggesting is that I should use 2 custom dropdown controls and get the data directly from List A and B and then apply the filter?

 

Also, am I correct that for Pitching I would need a custom Save button?

 

Thanks,S

Helpful resources

Announcements
thirdimage

Power Automate 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

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

Top Kudoed Authors
Users Online
Currently online: 323 members 5,721 guests
Please welcome our newest community members: