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. Solved your problem? - Click on Accept as Solution. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too!

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. Solved your problem? - Click on Accept as Solution. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too!

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. Solved your problem? - Click on Accept as Solution. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too!

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

MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!

secondImage

Are Your Ready?

Test your skills now with the Cloud Skill Challenge.

Top Solution Authors
Top Kudoed Authors
Users online (57,490)