cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
MindfulMike
Helper II
Helper II

Combo boxes and SP Lookup columns HELP!

After doing research today, I am aware that using a LookUp column from my SPlist in my AppForm Combo Box is not a good idea.

 

I have 2 lists. SP1 is my main list and it is what the App updates after the form is submitted. SP1 has a lookup column that returns SP2's, CoulmnX and ColumnY.

 

The form has a Combo Box that has Values from SP2's ColumnX.

When I test the App and populate the Combo Box it does not update in SP1. It just stays blank.

 

Any suggestions on how to go about this?

 

Thanks in advanced!

5 REPLIES 5
WarrenBelz
Super User
Super User

Hi @MindfulMike ,

I could not agree more on Lookup columns - I have not used them for many years (this blog of mine on Data Structure may be useful to you)

You should need in the Data Card Update

{
   Value: ComboBox.Selected.ColumnX
   Id:
   LookUp(
      SP2,
      ColumnX = ComboBox.Selected.ColumnX
   ).ID
}
   

 This is assuming the output of the Combo Box is as above.

 

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

Hi! @WarrenBelz 😀

 

Playing around with your suggestion has not worked so far but it could be because of my DataCard setup. Hopefully you can spot something I missed!

 

  • DataCard in AppForm that contains Combo Box 

 

Property - DataField: The name of the lookup column in SP1 that is looking up SP2 ColumnX. Lets call this "ColumnXLU"

 

Property - Update

{
   Value: ComboBox.Selected.Value  //I put Value here because ColumnX was not recognized//
   Id:
   LookUp(
      SP2,
      ColumnX = ComboBox.Selected.Value //I put Value here because ColumnX was not recognized//
   ).ID
}

 

Property - Default: ThisItem.ColumnXLU

 

 

  • Combo Box - This is pulling in the options for my lookup column in SP1 which is ColumnXLU

Property - Items

Choices(
['SP1'].ColumnXLU
)
.Value

 

 

After I put the Update into the data card, my flow just stopped working and no new items were created in SP1

Hi @WarrenBelz !

 

I found a different way of what I needed accomplished. 

 

SP2 was only created to help filter my gallery, but thought I needed my drop down to pull from SP2, but for my app this wasn't necessary.

I created another invisible field in my form that takes my User Email and extracts everything after the "@". This invisible field now populates my SP1 instead of using the form to populate the lookup column in SP1. 

 

Thank you so much for the help! You have been awesome with all my questions on these forums! 

@MindfulMike ,

As I noted, I was assuming the output of the Combo Box based on your post.

If change your ComboBox Items to

Choices(['SP1'].ColumnXLU)

and set it to display the Value, then the Update of the Data Card can be

{
   Value: ComboBox.Selected.Value
   Id: ComboBox.Selected.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

 

 

 

WarrenBelz
Super User
Super User

Hi @MindfulMike ,

Just checking if you got the result you were looking for on this thread. Happy to help further if not.

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

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

365 EduCon 768x460.png

Microsoft 365 EduCon

Join us for two optional days of workshops and a 3-day conference, you can choose from over 130 sessions in multiple tracks and 25 workshops.

Users online (4,025)