cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Advocate II
Advocate II

Set Selected Value of Combo Box from Another Data Source

I am using PowerApps to customize a SharePoint list form. I have a combo box where Items = Sort(DataSource1.Title, Title)

 

and I am pulling from another data source using LookUp(DataSource2, selectedClientID = ID, value)

 

I want to use the lookup from the second data source as the default selected value of the combo box. Is this possible? I've tried adding the lookup to Default, DefaultSelectedItems, Adding Filter(ComboBox, Title = Lookup(..), Title)

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Community Support
Community Support

Hi @kayleegoose ,

Do you want to set a Default value within the ComboBox based on the result your LookUp formula returns?

 

Based on the needs that you mentioned, I have made a test on my side, please take a try with the following orkaround:

Set the DefaultSelectedItems property of the ComboBox to following:

{
  Title: LookUp(DataSource2, selectedClientID = ID, value)
}

If you enable Multiple selections within the ComboBox, please modify above formula as below:

Table(
         {
            Title: LookUp(DataSource2, selectedClientID = ID, value)
         }
)

Please consider take a try with above solution, then 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

5 REPLIES 5
Highlighted
Responsive Resident
Responsive Resident

Hi,

 

One you get the lookup values, keep it in array format in a variable and use it as defaultselecteditems for combobox.

 

Mark it as verified if it answers your question.

Regards,

Pavan Kumar Garlapati

Highlighted

Thank you for your reply. The lookup function should only return one value. I changed it so that when the user selects something, a variable is set with the lookup function in it. When I add that variable to the DefaultSelectedItems, I get an error stating "Expected Table Value".

Highlighted

Also, when I switch it from Lookup to Filter, I don't get the same error until I try to use the form. Then I get an error saying "Conversion failed when converting the nvarchar value "Individual" to data type int". I'm pretty sure the choices in the combo box are text, not int. 

Highlighted
Community Support
Community Support

Hi @kayleegoose ,

Do you want to set a Default value within the ComboBox based on the result your LookUp formula returns?

 

Based on the needs that you mentioned, I have made a test on my side, please take a try with the following orkaround:

Set the DefaultSelectedItems property of the ComboBox to following:

{
  Title: LookUp(DataSource2, selectedClientID = ID, value)
}

If you enable Multiple selections within the ComboBox, please modify above formula as below:

Table(
         {
            Title: LookUp(DataSource2, selectedClientID = ID, value)
         }
)

Please consider take a try with above solution, then 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

Perfect! Thank you so much!

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

News & Announcements

Community Blog

Stay up tp date on the latest blogs and activities in the community News & Announcements.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Community Highlights

Community Highlights

Check out the Power Platform Community Highlights

Top Solution Authors
Top Kudoed Authors
Users online (8,606)