cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
kayleegoose
Level: Powered On

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
Community Support Team
Community Support Team

Re: Set Selected Value of Combo Box from Another Data Source

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
Level 8

Re: Set Selected Value of Combo Box from Another Data Source

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

kayleegoose
Level: Powered On

Re: Set Selected Value of Combo Box from Another Data Source

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

kayleegoose
Level: Powered On

Re: Set Selected Value of Combo Box from Another Data Source

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. 

Community Support Team
Community Support Team

Re: Set Selected Value of Combo Box from Another Data Source

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

kayleegoose
Level: Powered On

Re: Set Selected Value of Combo Box from Another Data Source

Perfect! Thank you so much!

Helpful resources

Announcements
thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

Top Kudoed Authors (Last 30 Days)
Users online (5,767)