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

Cascading Dropdowns from SP Lookup Columns

Hi, 

 

Hoping someone can help me out 🙂

 

I currently have 2x SP lists connected to a PowerApps Training app.

 

One list has two text columns is used as a lookup for Course Type and Sub Types in the PowerApps, mainly for the access of a Non-Power User to update the entries as types are needed.

 

These columns are also present in the main list as lookup columns.

 

So far I am able to get the Dependent Dropdown's to work, and have a user fill in and submit the form but unfortunately I am unable to get them to write back to the main list. Just a blank entry appears in the main list for both columns.

 

Please note I am using only Combo boxes with forms - no independent dropdowns.

 

If you need anymore information let me know

 

 

 

1 ACCEPTED SOLUTION

Accepted Solutions

Hi @MTaylorWinson ,

Update of the cards (you will need to use your Control Names)

{
   Value:YourCourseDD.Selected.Result,
   Id:
   LookUp(
      'Course Type',
      Title = YourCourseDD.Selected.Result
   ).ID
}

Sub-type

{
   Value:YourSubCourseDD.Selected.CourseSubType,
   Id:
   LookUp(
      'Course Type',
      SubType = YourSubCourseDD.Selected.CourseSubType
   ).ID
}

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

Visit my blog Practical Power Apps

View solution in original post

8 REPLIES 8
WarrenBelz
Super User
Super User

Hi @MTaylorWinson ,

Assuming these Combo Boxes are in the Form and you use SubmitForm() to save the data, what are the Update properties of the two data cards containing the combo boxes?

MTaylorWinson
New Member

Hi @WarrenBelz,

 

Yes correct they are in the form and I am using SubmitForm() to save the data.

 

Both have DataCardValue.Selected

 

Hi @MTaylorWinson ,

If you are writing back to Lookup columns (please confirm), I need a bit more

  • The Items of both combo boxes
  • The names of both lists
  • The names of the fields in the second list that are being lookup up

It would be far easier for you to use Text columns and let Power Apps do the looking up. Lookup columns will cause yo more unwanted and unnecessary grief unless you need them to interact directly in SharePoint.

MTaylorWinson
New Member

Thanks for the quick response @WarrenBelz they are in-fact lookup columns, sometimes Users need to go into the Main List and Make changes and having the lookup choice there with the correct spelling is great for the PowerBI report that is connected.

Here are some screenshots, I have circled columns in question in the List Settings Overview

Main List - "Online Training Application"

MTaylorWinson_0-1641966636655.png

 

Lookup List - "Course Type"

MTaylorWinson_1-1641966726786.png

Items on the way in next comment.

 

 

 

MTaylorWinson
New Member

Items

Course Type:

Distinct('Course Type',Name)

 

Items

SubCourseType:

Filter('Course Type', Title = DataCardValue5.Selected.Result)

Hi @MTaylorWinson ,

Update of the cards (you will need to use your Control Names)

{
   Value:YourCourseDD.Selected.Result,
   Id:
   LookUp(
      'Course Type',
      Title = YourCourseDD.Selected.Result
   ).ID
}

Sub-type

{
   Value:YourSubCourseDD.Selected.CourseSubType,
   Id:
   LookUp(
      'Course Type',
      SubType = YourSubCourseDD.Selected.CourseSubType
   ).ID
}

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

Visit my blog Practical Power Apps

MTaylorWinson
New Member

@WarrenBelz you absolute legend worked straight away, I should of posted this question 3 weeks ago!

No problems @MTaylorWinson ,

As I said, Lookup columns and Power Apps do not always play nicely together (I have not used them for many years). This blog of mine may be of interest to you.

 

Helpful resources

Announcements
Power Apps News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

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