cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
kayleegoose
Advocate IV
Advocate IV

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
v-xida-msft
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
PavanKumar
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

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".

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. 

v-xida-msft
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

Perfect! Thank you so much!

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

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