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

Re: Cascading Combo Box

Hi @R3dKap ,

Thank you. it worked. 

 

Another question w.r.t Comboboxes: 

Is there a way to set Display field of combobox as ColA from table and value field as ColB. i.e if i select any value in the combobox, i want to store its corresponding value into excel.
If this is acheivable, Also can you please help me how to make this work by using Distinct.

 

thanks,

-Dileep

R3dKap
Level 10

Re: Cascading Combo Box

Hi @dileeprajam,

Can you please give me a detailed example of what you want to do?

Thanks,

Emmanuel

dileeprajam
Level: Powered On

Re: Cascading Combo Box

Hi @R3dKap ,

 

Lets say i have a Emp table with 3 columns EmpName, EmpId, DeptName. Now i need to setup a combobox that shows distinct values of EmpName. Now When i hit save button, I need to save comma seperated EmpIDs of selected EmpNames from combobx into my output table. 

Can you please help me in acheiving this functionality.

 

thanks,

-Dileep

R3dKap
Level 10

Re: Cascading Combo Box

@dileeprajam,

Ok, I see. Well to do that you could use the Concat() function like this:

Concat(ComboBox1.SelectedItems, EmpId & ",")

This will generate a string with the ids of the selected items like this:

3,5,7,1,

Then, use string manipulation functions to remove the last "," if needed.

Hope this helps,

Emmanuel

Highlighted
dileeprajam
Level: Powered On

Re: Cascading Combo Box

Hi @R3dKap ,

 

It is not working when i use concat function it is only accepting Concat(ComboBox1.SelectedItems, Result & ",").

one question here. if i am using EmpName as the field for combobox will the EmpId be accepted?

 

thanks,

-Dileep

R3dKap
Level 10

Re: Cascading Combo Box

That's because we're using the Distinct() functions which returns a "Result" single-column table.

So, if you keep the Distinct() inside your Items property of your combo boxes, you will not be able to retrieve the list of selected ids unless you use a function like ForAll() to loop through your items and get their ids. But then your app starts to be more complicated.

Maybe if you expose here what is your original need, we might find a better way of implementing it...

Helpful resources

Announcements
thirdimage

Power Apps Community User Group Member Badge

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

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

SecondImage

Difinity Conference

The largest Power BI, Power Platform, and Data conference in New Zealand

Top Kudoed Authors (Last 30 Days)
Users online (4,200)