cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
PowerStar321
Helper II
Helper II

Combo box linked to a SharePoint list lookup column

Hi All,

 

I have a submissions app with a combo box that is linked to a SharePoint list lookup column. I am trying to set the combo box using text from a label. I place the following code within the DefaultSelectedItems area of the combo box:

 

[{Value: Label1.Text}]

I've also tried

{Value: Label1.Text}

It fills in the comb box with the correct text, but when I press the submit button and go to the SharePoint site the column is blank. If I make the selection manually from the dropdown list the selection shows up in the SharePoint list OK.  

 

I hope you can help,

PowerStar321

1 ACCEPTED SOLUTION

Accepted Solutions
v-albai-msft
Community Support
Community Support

Hi @PowerStar321 ,

Let me explain why you encountered this problem.

The point is that the data structure of below two formula are different:

The value of  Choices([@listname].lookupcolumn) is a table with many columns.

The value of  {Value: Label2.Text} is an one-column Table.

As a result, you can try below formula for the DefaultSelectedItems property(make sure label1.Text is one of your combo box choices):

LookUp( Choices([@listname].lookupcolumn) ,Value=Label1.Text)

Best Regards,

Allen

View solution in original post

2 REPLIES 2
v-albai-msft
Community Support
Community Support

Hi @PowerStar321 ,

Let me explain why you encountered this problem.

The point is that the data structure of below two formula are different:

The value of  Choices([@listname].lookupcolumn) is a table with many columns.

The value of  {Value: Label2.Text} is an one-column Table.

As a result, you can try below formula for the DefaultSelectedItems property(make sure label1.Text is one of your combo box choices):

LookUp( Choices([@listname].lookupcolumn) ,Value=Label1.Text)

Best Regards,

Allen

Thanks Allen 

 

That worked like a dream !

Helpful resources

Announcements
Power Platform Call June 2022 768x460.png

Power Platform Community Call

Join us for the next call on August 17, 2022 at 8am PDT.

Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

Users online (2,359)