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

Combo box: Items property = Table with two columns. How to display the values from Column 2 but store the values from Column1?

Hi, I'm having some issues to do the following. Any help is much appreciate.

 

I have a table with two columns. I want to display in a ComboBox the column "Description", and when the item is selected, display the value of the column ID in a Label Text. I have the following Elements:

 - Table1: Where the data is

 - ComboBox1: ComboBox displaying column Description

 - Label1: Label displaying the ID  of the selected Description in Table1

 

For example, giving the Table 1 below, my ComboBox1 should display ITEM_1, ITEM_2, ITEM_3, ITEM_4, ITEM_5,

If I select the ITEM_1, Label1 should display "1"

 

Table1

ID    Description

1      ITEM_1

2      ITEM_2

3      ITEM_3

4     ITEM_4

5      ITEM_5

 

I've tried to add to Combobox the following

  • Items: Table1.Description. It display the items in the combobox but I can not get the ID in Label. (I am using in Label - TEXT: Combobox1.Selected.Text)
  • Items: Table1. It display the items in the combobox but 1) I can't search in the combobox and 2) I can not get the ID in Label. 

Any suggestion?

1 ACCEPTED SOLUTION

Accepted Solutions
EricLott
Level 10

Re: Combo box: Items property = Table with two columns. How to display the values from Column 2 but store the values from Column1?

Try using Combobox1.Selected.ID as the Text property of the label. The Items property of the dropdown should just be Table1

If you have multiple selections, you can use this formula

Concat(ComboBox1.SelectedItems.ID,Text(ID),", ")

---
If this answered your question, please click "Accept Solution". If this helped, please Thumbs Up.

View solution in original post

3 REPLIES 3
EricLott
Level 10

Re: Combo box: Items property = Table with two columns. How to display the values from Column 2 but store the values from Column1?

Try using Combobox1.Selected.ID as the Text property of the label. The Items property of the dropdown should just be Table1

If you have multiple selections, you can use this formula

Concat(ComboBox1.SelectedItems.ID,Text(ID),", ")

---
If this answered your question, please click "Accept Solution". If this helped, please Thumbs Up.

View solution in original post

eka24
Level 10

Re: Combo box: Items property = Table with two columns. How to display the values from Column 2 but store the values from Column1?

if all the structure is the same then try in the Leabel:

Substitute(ComboBox2.Selected.Value,"Term_"," ")
Sam4
Level: Powered On

Re: Combo box: Items property = Table with two columns. How to display the values from Column 2 but store the values from Column1?

Thanks both for your replies, 

 

@EricLott  your solution works, I think I had some type of connectivity problems as I would say I tried that, anyway, thanks :). I don't have multiple selections so that is fine.

 

If I have in Items for the combobox Table1, how I can make sure it is displaying the column Description?

Helpful resources

Announcements
Better Together’ Contest Finalists Announced!

'Better Together’ Contest Finalists Announced!

Congrats to the finalists of our ‘Better Together’-themed T-shirt design contest! Click for the top entries.

thirdimage

Power Apps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Join THE global Microsoft Power Platform event series

Attend for two days of expert-led learning and innovation on topics like AI and Analytics, powered by Dynamic Communities

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

thirdimage

Microsoft Business Applications Virtual Launch

Join us for the Microsoft Business Applications Virtual Launch Event on Thursday, April 2, 2020, at 8:00 AM PST.

thirdimage

Community Summit North America

Innovate, Collaborate, Grow - The top training and networking event across the globe for Microsoft Business Applications

Top Solution Authors
Top Kudoed Authors
Users online (6,304)