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
Super User

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
User Group Leader Meeting January 768x460.png

Calling all User Group Leaders!

Don't miss the User Group Leader meetings on January, 24th & 25th, 2022.

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Top Solution Authors
Top Kudoed Authors
Users online (2,302)