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)
Solved! Go to Solution.
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,
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.
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,
Perfect! Thank you so much!
User | Count |
---|---|
141 | |
137 | |
78 | |
77 | |
72 |
User | Count |
---|---|
228 | |
178 | |
68 | |
68 | |
58 |