cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Helper III
Helper III

Working With Combo Boxes In Power Apps

Hi,

 

I have a SharePoint list where data is stored as comma separated values for a particular column.

Eg: Column name is 'Department' and the data is stored as Sales,Marketing for a particular user A.

 

In the application i have a combo box where i want the department values to be shown as individual items based on the user name selected from a combo box above.

 

How can i achieve this ?

 

Any help will be appreciated greatly.

 

Regards

Srinath

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Community Support
Community Support

Re: Working With Combo Boxes In Power Apps

Hi @Srinath ,

 

Please try to put the following codes to Combo box Items property and DefaultSelectedItems property.

 

Split(First(Distinct(Filter(TableName,Country=CB_CountryNew.Selected.Result&& EmployeeEmail=VarUserEmail),'Project Department')).Result,",")

 

Modify Update property of Data Card to convert the selection to Text when submitting.

 

Left(Concat(CB_Department.SelectedItems,Result & ","),Len(Concat(CB_Department.SelectedItems,Result & ","))-1)

 

Test Result:

Snipaste_2020-03-16_14-24-42.pngSnipaste_2020-03-16_14-25-24.png

Hope this helps.

Sik

View solution in original post

5 REPLIES 5
Highlighted
Super User III
Super User III

Re: Working With Combo Boxes In Power Apps

@Srinath
Setup Combobox2 like this:

DefaultSelectedItems
Split(ComboBox1.Selected.Departments,”,”)

Items (must include every possible option)
[“Marketing”,”Sales”]

—-
Please Accept as Solution if this post answered your question so others may find it more quickly. If you found this post helpful consider giving it a Thumbs Up.
Highlighted
Helper III
Helper III

Re: Working With Combo Boxes In Power Apps

Hi @mdevaney ,

 

Please find attached some screenshots of my app. Kindly suggest how I can implement the above solution here.

 

Regards

Srinath

Highlighted
Super User III
Super User III

Re: Working With Combo Boxes In Power Apps

@Srinath
Have you tried my suggestion above?

If not, create a new ComboBox and insert the code I suggested in those properties.

—-
Please Accept as Solution if this post answered your question so others may find it more quickly. If you found this post helpful consider giving it a Thumbs Up.
Highlighted
Community Support
Community Support

Re: Working With Combo Boxes In Power Apps

Hi @Srinath ,

 

Please try to put the following codes to Combo box Items property and DefaultSelectedItems property.

 

Split(First(Distinct(Filter(TableName,Country=CB_CountryNew.Selected.Result&& EmployeeEmail=VarUserEmail),'Project Department')).Result,",")

 

Modify Update property of Data Card to convert the selection to Text when submitting.

 

Left(Concat(CB_Department.SelectedItems,Result & ","),Len(Concat(CB_Department.SelectedItems,Result & ","))-1)

 

Test Result:

Snipaste_2020-03-16_14-24-42.pngSnipaste_2020-03-16_14-25-24.png

Hope this helps.

Sik

View solution in original post

Highlighted
Helper III
Helper III

Re: Working With Combo Boxes In Power Apps

Hi @v-siky-msft ,

 

Thanks for the response. I have tried your solution and it works.

 

Regards

Srinath

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Tech Marathon

Maratón de Soluciones de Negocio Microsoft

Una semana de contenido con +100 sesiones educativas, consultorios, +10 workshops Premium, Hackaton, EXPO, Networking Hall y mucho más!

Top Solution Authors
Top Kudoed Authors
Users online (5,895)