cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
CollabTechie
Responsive Resident
Responsive Resident

Combobox DefaultSelectedItems based on SharePoint single text column string

Hi Folks,
I am using a combo box to patch to an SP single text column. However, when I open my app the combo box remains empty despite the 'Program Manager' defined within the list. When I set the DefaultSelectedItems property it returns an error as shown below

DefaultSelected.JPG

ProgramManager.JPG

 

How can I get around this?

Thanks
CT

1 ACCEPTED SOLUTION

Accepted Solutions
RandyHayes
Super User III
Super User III

@CollabTechie 

If it is a simple table ["User1", "User2"], then this will result in a table with a single column called Value.

Therefore, your formula for the DefaultSelectedItems will be:

   {Value: Gal_NewRequests.Selected.'Program Manager'}

 

 

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

View solution in original post

4 REPLIES 4
RandyHayes
Super User III
Super User III

@CollabTechie 

DefaultSelectedItems is a record.  You are trying to assign a text value to it. 

You need to provide a record that matches the record schema of the Items property of your combobox.

What is the Items property?

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

I have manually entered an array ["User1", "User2"] etc. Would it be better if I made the SP column a choice column and used Choices(Datasource.ProgramManagers) and then set the DefaultSelectedItem based on this?

RandyHayes
Super User III
Super User III

@CollabTechie 

If it is a simple table ["User1", "User2"], then this will result in a table with a single column called Value.

Therefore, your formula for the DefaultSelectedItems will be:

   {Value: Gal_NewRequests.Selected.'Program Manager'}

 

 

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

View solution in original post

That worked perfectly, thank you so much!

Helpful resources

Announcements
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

secondImage

Demo Extravaganza Winner Announcement

Please join us on Wednesday, July 21st at 8a PDT. We will be announcing the Winners of the Demo Extravaganza!

V3_PVA CAmpaign Carousel.png

Community Challenge - Giveaways!

Participate in the Power Virtual Agents Community Challenge

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

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