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

Updating a Choice Column on a Custom Form using a Combo Box with custom Items

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

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support Team
Community Support Team

Re: Updating a Choice Column on a Custom Form using a Combo Box with custom Items

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:9.JPG

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,

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

4 REPLIES 4
jhall
Level 8

Re: Updating a Choice Column on a Custom Form using a Combo Box with custom Items

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

 

hernandezdl
Level: Powered On

Re: Updating a Choice Column on a Custom Form using a Combo Box with custom Items

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

Community Support Team
Community Support Team

Re: Updating a Choice Column on a Custom Form using a Combo Box with custom Items

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:9.JPG

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,

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

hernandezdl
Level: Powered On

Re: Updating a Choice Column on a Custom Form using a Combo Box with custom Items


@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:9.JPG

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!

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 (6,808)