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

Fill combobox from Sharepoint list with choice

Hi

I have a problem that i can find any solution

I have a list created in sharepoint, this list have some columns (at the moment no records) that two are type choice with his values. For example

Colum TypeWorkpc values Calculate ,Office ,3d or

Colum Pc values Laptop ,Workstation

 

I have a power app with a Combobox, i want that this combobox, fill with values that are in TypeWorkPc or Pc, that for exemple i add a new value or i edit in my Sharepoint List , automaticaly in my powerapp when i run chage it.

 

Does anybody know how i have to do it?

Maybe it's something that's not possible because the Colum it's choice and not Text?

 

Thanks for all

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Community Support
Community Support

Re: Fill combobox from Sharepoint list with choice

Hi @llserra ,

Could you please share a bit more about your scenario?

Do you want to populate a ComboBox with values from TypeWorkpc field or Pc field?

 

Based on the needs that you mentioned, I think the Collection could achieve your needs. I have made a test on my side, please consider take a try with the following workaround:

Set the OnStart property of the App to following:

 

ClearCollect(
             AvailableOptions, 
             Choices('SP List'.TypeWorkpc), 
             Choices('SP List'.Pc)
)

 

Set the Items property of the ComboBox in your app to following:

 

AvailableOptions

 

Set the SelectMultiple property of the ComboBox to following (single selection😞

 

false

 

 

If you want to reference selected value from the ComboBox, please use the following formula:

 

ComboBox1.Selected.Value

 

Note: Please take a try with above solution, then re-load your app (fire the OnStart property of App), check if the issue is solved.

 

Best regards, 

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

3 REPLIES 3
Highlighted
Community Support
Community Support

Re: Fill combobox from Sharepoint list with choice

Hi @llserra ,

Could you please share a bit more about your scenario?

Do you want to populate a ComboBox with values from TypeWorkpc field or Pc field?

 

Based on the needs that you mentioned, I think the Collection could achieve your needs. I have made a test on my side, please consider take a try with the following workaround:

Set the OnStart property of the App to following:

 

ClearCollect(
             AvailableOptions, 
             Choices('SP List'.TypeWorkpc), 
             Choices('SP List'.Pc)
)

 

Set the Items property of the ComboBox in your app to following:

 

AvailableOptions

 

Set the SelectMultiple property of the ComboBox to following (single selection😞

 

false

 

 

If you want to reference selected value from the ComboBox, please use the following formula:

 

ComboBox1.Selected.Value

 

Note: Please take a try with above solution, then re-load your app (fire the OnStart property of App), check if the issue is solved.

 

Best regards, 

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Highlighted
Helper I
Helper I

Re: Fill combobox from Sharepoint list with choice

Thanks @v-xida-msft ,its working ,but just that i need two combobox s ,and i have created two AvaliableOptions but doesn't work.

Maybe it's not possible in OnStart?

 

ClearCollect(
AvailableOptions;
Choices (PrestamosEquipos.TypeWorkPc)
);
ClearCollect(
AvailableOptions2;
Choices (PrestamosEquipos.Pc)
)

 

ComboBox1.items=AvailableOptions

ComboBox2.items=AvailableOptions2

 

Thanks!

Highlighted
Helper I
Helper I

Re: Fill combobox from Sharepoint list with choice

Done!

 

ClearCollect(
AvailableOptions;
Choices (PrestamosEquipos.TypeWorkPc)
);;
ClearCollect(
AvailableOptions2;
Choices (PrestamosEquipos.Pc)
)

 

Was doble ';;' ,sorry !


Thanks for all !

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Find your favorite faces from the community presenting at the Power Platform Community Conference!

Watch Now

Experience what’s next for Power Apps

See the latest Power Apps innovations, updates, and demos from the Microsoft Business Applications Launch Event.

Check this Out

Helpful information

Featuring samples like Return to the Workplace and Emergency Response Applications

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (12,218)