cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Appyenthusiast
Frequent Visitor

Combobox not able to pass on selected values from the dropdown list

Hello,

 

I previously used DropDown but I found out that it does not have an inline search. So I have to use a Combobox for this function. The snapshot is from the list populated by Combobox1. Multiple selection is off. And the items property is a SQL table called 'Details'. The list that is shown is from a Column/Field named Customer_Name in the 'Details' table.

Appyenthusiast_0-1626249563677.png

Now the lookup query is not working to retrieve the Customer_Id from the same table 'Details'

 

 

LookUp(Details, Customer_Name = Combobox1.SelectedItems).Customer_Id

 

 

But if I use the code below, it successfully returns the Customer_Id

 

LookUp(Details, Customer_Name = "Understated advantage").Customer_Id

 

 What am I doing wrong here? Any help is appreciated.

1 ACCEPTED SOLUTION

Accepted Solutions

As mentioned in my original question :

"And the items property is a SQL table called 'Details'."

 

However after some more trial and error, this edit using the CONCAT command seems to work. I am not sure why though.

LookUp(Details, Customer_Name = Concat(ComboBox1.SelectedItems, Customer_Name,", ")).Customer_Id

View solution in original post

7 REPLIES 7
WarrenBelz
Super User III
Super User III

Hi @Appyenthusiast ,

Try

LookUp(
   Details, 
   Customer_Name = Combobox1.Selected.Customer_Name
).Customer_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.

Unfortunately that did not work. 

@Appyenthusiast ,

What are the Items of ComboBox1?

As mentioned in my original question :

"And the items property is a SQL table called 'Details'."

 

However after some more trial and error, this edit using the CONCAT command seems to work. I am not sure why though.

LookUp(Details, Customer_Name = Concat(ComboBox1.SelectedItems, Customer_Name,", ")).Customer_Id

View solution in original post

@Appyenthusiast ,

That does not make a lot of sense to me that your customer name would consist of the list of items selected in a combo box separated by commas.

As for your Items, I wanted to check if it was filtered on this list - I always ask for the exact code as many people post fairly vague references.

 

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.

There is no 'code' it just populates the name of the Data table in SQL

Appyenthusiast_0-1626350108298.png

 

@Appyenthusiast ,

I know - I was just explaining why I ask questions rather than assuming the person posting understands what the content of their post could mean.

Helpful resources

Announcements
PA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

Power Query PA Forum 768x460.png

Check it out!

Did you know that you can visit the Power Query Forum in Power BI and now Power Apps

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

PowerPlatform 768x460.png

Microsoft Learn

Check out our new Discover Your Career Path blog post series and get all the details.

Users online (979)