Background: An automatically-generated PowerApps Custom Form has a Combo Box associated to a Choice column. I then update the Combo Box to display Names from a different list in SharePoint (using the Items property on the Combo Box to reference the corresponding Data Source)
Issue: When utilizing the Form in Sharepoint, after selecting multiple items on the Combo Box and clicking on Save, the Choice column does not update or inherit the user selection from the Combo Box -nothing happens
The main parameters are as follows:
tblTeamMembers is the Data Source for the team members. It has only one field, which is MemberName
ChoiceText is the name of the Choice column
cbSelectedTeam is the ComboBox to select team members
cbSelectedTeam Items is set to: tblTeamMembers.MemberName
cbSelectedTeam DefaultSelecteditems is set to: Parent.Default
DataCard Update is set to: cbSelectedTeam.SelectedItems
DataCard Default is set to: ThisItem.ChoiceText
Can you please help? Thank you
Solved! Go to Solution.
HI @hernandezdl ,
Could you please share a bit more about the ChoiceText column in your SP list? Do you enable "Allow Multiple selections" option for this Choice column?
I assume that you have enabled the "Allow Multiple selections" option for this ChoiceText column in your SP list, is it true? Based on the formula you provided, I think there is something wrong with it.
I have made a test on my side, please take a try with the following workaround:
Set the Update property of the Choice column Data card which contains the ComboBox to following:
ForAll( DataCardValue16.SelectedItems, { Value: Value } )
Within your app, you should set the Update property of the ChoiceText Data card in your Edit form to following:
ForAll(
cbSelectedTeam.SelectedItems,
{
Value: MemberName
}
)
If you do not enable the "Allow Multiple selections" option for the ChoiceText column in your SP list, you could not save multiple values from the cbSelectedTeam ComboBox to your ChoiceText column. So please enable the "Allow Multiple selections" option for the ChoiceText column in your SP list firstly, then take a try with above solution.
Please take a try with above solution, then check if the issue is solved.
Best regards,
If I understand you correctly, the problem is you've disconnected your control from the original data source that the Form was linked to.
If you want something other than what is in the Choice column by default within the original SharePoint table, then you should merge that original Collection (vs. replacing it) using a LookUp() from the other Source (assuming there is some common value you can link to - like Email), and using the AddColumn function, then selecting the Data | Value field to display from the new Column you added from the new source. This should retain the original link and will likely work (but I honestly haven't tried so would need to test).
Thank you for your prompt reply.
The thing is that, if I follow my same outlined procedure with a simple Text column and I reassign the original Input Text box with a ListBox (and a single selection) things work just fine -no need for a lookup. The problem here is that I am returning not a single value, but a set of values (several names selected from the combo box) to a Choice column
HI @hernandezdl ,
Could you please share a bit more about the ChoiceText column in your SP list? Do you enable "Allow Multiple selections" option for this Choice column?
I assume that you have enabled the "Allow Multiple selections" option for this ChoiceText column in your SP list, is it true? Based on the formula you provided, I think there is something wrong with it.
I have made a test on my side, please take a try with the following workaround:
Set the Update property of the Choice column Data card which contains the ComboBox to following:
ForAll( DataCardValue16.SelectedItems, { Value: Value } )
Within your app, you should set the Update property of the ChoiceText Data card in your Edit form to following:
ForAll(
cbSelectedTeam.SelectedItems,
{
Value: MemberName
}
)
If you do not enable the "Allow Multiple selections" option for the ChoiceText column in your SP list, you could not save multiple values from the cbSelectedTeam ComboBox to your ChoiceText column. So please enable the "Allow Multiple selections" option for the ChoiceText column in your SP list firstly, then take a try with above solution.
Please take a try with above solution, then check if the issue is solved.
Best regards,
@v-xida-msft wrote:HI @hernandezdl ,
Could you please share a bit more about the ChoiceText column in your SP list? Do you enable "Allow Multiple selections" option for this Choice column?
I assume that you have enabled the "Allow Multiple selections" option for this ChoiceText column in your SP list, is it true? Based on the formula you provided, I think there is something wrong with it.
I have made a test on my side, please take a try with the following workaround:
Set the Update property of the Choice column Data card which contains the ComboBox to following:
ForAll( DataCardValue16.SelectedItems, { Value: Value } )Within your app, you should set the Update property of the ChoiceText Data card in your Edit form to following:
ForAll( cbSelectedTeam.SelectedItems, { Value: MemberName } )
If you do not enable the "Allow Multiple selections" option for the ChoiceText column in your SP list, you could not save multiple values from the cbSelectedTeam ComboBox to your ChoiceText column. So please enable the "Allow Multiple selections" option for the ChoiceText column in your SP list firstly, then take a try with above solution.
Please take a try with above solution, then check if the issue is solved.
Best regards,
Kris,
Thank you. This worked perfectly. One last question. Once I am working on Sharepoint, when I edit the record, the Combo Box seems to be cashed to the record before the last update (on the app, not on the actual list), is there a way to refresh? I added the Patch as you explained above, but, can you explain the rationale for it? That might be where the cached issues is? Thank you once again!
Hi @v-xida-msft ,
I have same kind requirement and I have followed the same approach which you have suggested as below , i posted the same query https://powerusers.microsoft.com/t5/Building-Power-Apps/Update-Choice-Column-Multiple-Enabled-from-C...
Update Property :
ForAll(
DataCardValue19.SelectedItems,
{Value: DataCardValue19.Selected.Applicable_x0020_Models}
)
But After the the form submission it is updating the last selected value only to column.
Requesting you to please help me on this .
Thanks in advance .
Regards,
Mahesh
User | Count |
---|---|
259 | |
110 | |
97 | |
52 | |
39 |