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

Add Radio button control in PowerApp for choice field in SharePoint list

I have a choice button field in SharePoint List and i am developing a PowerApp for that list.

 

I want to render that choice field as radio button on form in  PowerApp.

 

  1. I added a radio button control in the desired datacard.
  2. I set the "Default" property for dropdown field to radio button selected value.
  3. Once i select radio button as "Yes" , dropdown field also set  "Yes".

Issue: Once i click on save it gives error "The requested operation is invalid. Server Response. A value must be provided for item".

 

Any suggestions ?

 

Screenshot below.

 

custom field issue.png

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support Team
Community Support Team

Re: Add Radio button control in PowerApp for choice field in SharePoint list

Hi @manjotsingh057,

 

This is because the Choice field is a record type.

Single text value will not work for saving the Choice field.

Please take a try to change the Default property of the Choice field as below:

If(Radio1.Selected.Value="Yes",
{'@odata.type':"#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference",
   Id:0,
  Value:"Yes"}
)

This assumes that the Choice field definition under SharePoint list is:

Yes

No

Other 

Which means the Yes value should be at the top of the Choice value.

 

Doing this would make the Saving work as expected.

 

Further, for the error message, please make sure you have all the required field entered with a valid value.

If any required field is not provided with a valid value, there would be error messages popped out, so per this error, you should have the Item field not entered or left blank.

 

 

Regards,

Michael

 

 

Community Support Team _ Michael Shao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
5 REPLIES 5
Community Support Team
Community Support Team

Re: Add Radio button control in PowerApp for choice field in SharePoint list

Hi @manjotsingh057,

 

This is because the Choice field is a record type.

Single text value will not work for saving the Choice field.

Please take a try to change the Default property of the Choice field as below:

If(Radio1.Selected.Value="Yes",
{'@odata.type':"#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference",
   Id:0,
  Value:"Yes"}
)

This assumes that the Choice field definition under SharePoint list is:

Yes

No

Other 

Which means the Yes value should be at the top of the Choice value.

 

Doing this would make the Saving work as expected.

 

Further, for the error message, please make sure you have all the required field entered with a valid value.

If any required field is not provided with a valid value, there would be error messages popped out, so per this error, you should have the Item field not entered or left blank.

 

 

Regards,

Michael

 

 

Community Support Team _ Michael Shao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
manjotsingh057
Level: Powered On

Re: Add Radio button control in PowerApp for choice field in SharePoint list

@v-micsh-msft

Thanks Michael,

 

I tried doing that. It stores "

#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference

 " as field value rather than yes/no. However item is getting saved fine but with wrong values.

 

Radio Button issue.png

 

Please suggest.

manjotsingh057
Level: Powered On

Re: Add Radio button control in PowerApp for choice field in SharePoint list

Solved by modifying the advanced properties of control. Setting value property instead of odata

RussellGove
Level 8

Re: Add Radio button control in PowerApp for choice field in SharePoint list

Hi,

Just a note for others who may stumble on to this. I found that you need to set the default property of the CARD, not the dropdaown control to the JSON value noted. in my case I set the CARDs Default   to

 

{'@odata.type':"#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference",
Id:1,
Value:RadioRegionalApproval.Selected.Value}

 

 

note that you can refernece the radio buttons value directly in the Json( no need for that if statement). 

 

 

Highlighted
rgbrasel
Level: Powered On

Re: Add Radio button control in PowerApp for choice field in SharePoint list

If it appears in the OOTB web form in SharePoint as multiple checkboxes or radio buttons, the PowerApps development team should have done the work to make sure that it shows up as such in PowerApps. I would like for my users to be able to select multiple items from a Choice datatype. This isn't some esoteric request--this is basic, simple functionality for any form creation tool. This is ALMOST as ridiculous as Microsoft Forms not being able to handle time fields. 

 

Do better by your power users, please. I'm sick of the constant disappointment every time you launch something that looks promising.

Helpful resources

Announcements
firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

FirstImage

Power Platform World Tour

Coming to a city near you

thirdimage

PowerApps Community User Group Member Badge

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

FourthImage

Join PowerApps User Group!!

Connect, share, and learn with your peers year-round

SecondImage

Power Platform Summit North America

Register by September 5 to save $200

Top Kudoed Authors
Users Online
Currently online: 53 members 4,667 guests
Please welcome our newest community members: