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

Need Help to Update CDS DataCard from Radio Button control

I have a presentation on Wednesday that I need to have this fixed.  

 

I have added  Radio Button to my DataCard (replacing the default control), as shown below.  The data stored in CDS is correctly updating the values on existing records.  But when I change the data using the controls, or the text box for that matter, the record in CDS is not being updated, although the SubmitForm(JobReadyForm) appears to be saving the record without reporting errors.

 

THANKS FOR YOUR HELP!

 

This the Advanced settings for the DataCard and Radio Button...

Radio Button DataCard image.pngRadio Button Advanced Settings.png

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support Team
Community Support Team

Re: Need Help to Update CDS DataCard from Radio Button control

Hi @DonBo ,

Could you please share a bit more about the 'Job Clean', 'All Required Inspections Passed', 'All Required Work Complete',... column in your CDS Entity? Are they all Option Set type column with "Yes" and "No" available value?

 

I assume that the you added your Radio control within the Data cards in your Edit form, and these Option Set/Two Option type column has available options -- Yes & No, is it true?

 

I have made a test on my side, please take a try with the following workaround:

1. If the 'Job Clean', 'All Required Inspections Passed', 'All Required Work Complete',... are Option Set Type column in your CDS Entity:3.JPG

 

4.JPG

Unlock the ApprovalStatus Data card in Edit form, add a Radio control, set the Items property to following:

["Yes", "No"]

Set the Default property of the Radio control to following:

If(ThisItem.ApprovalStatus = [@ApprovalStatus].Approved, "Yes", "No")

On your side, you may need to type following formula:

If(
ThisItem.'Job Clean' = [@'Job Clean'].Yes, "Yes",
ThisItem.'Job Clean' = [@'Job Clean'].No, "No"
)

 

Set the Update property of the ApprovalStatus Data card to following:

If(
    Radio1.Selected.Value="Yes",
    [@ApprovalStatus].Approved,
    Radio1.Selected.Value="No",
    [@ApprovalStatus].Rejected
)

On your side, you may need to type following formula:

If(
    Radio1.Selected.Value="Yes",
    [@'Job Clean'].Yes,
    Radio1.Selected.Value="No",
    [@'Job Clean'].No
)

 

2. If the 'Job Clean', 'All Required Inspections Passed', 'All Required Work Complete',... are Two Option Type column in your CDS:

Set the Default property of the Radio control to following:

If(
ThisItem.'Job Clean' = 'Job Clean (YourEntityName)'.Yes, "Yes",
ThisItem.'Job Clean' = 'Job Clean (YourEntityName)'.No, "No"
)

Set the Update property of the ApprovalStatus Data card to following:

If(
    Radio1.Selected.Value="Yes",
    'Job Clean (YourEntityName)'.Yes,
    Radio1.Selected.Value="No",
   'Job Clean (YourEntityName)'.No
)

Please consider take a try with above solution, check if the issue is solved.

 

More details about modifing Option Set type column value, please check the following blog:

https://powerapps.microsoft.com/en-us/blog/option-sets-and-many-to-many-relationships-for-canvas-app...

 

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

8 REPLIES 8
Dual Super User
Dual Super User

Re: Need Help to Update CDS DataCard from Radio Button control

Hi @DonBo 

 

What is the default property for the data card containing the radio button 

Make sure to set that up correctly to read the value from the radio button control

That would be the value set in the CDS DB

 

Regards,

Reza Dorrani

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

DonBo
Level: Powered On

Re: Need Help to Update CDS DataCard from Radio Button control

I made this change to the DataCard "Default" and got this error

 

Radio Button DataCard Default field error.png

Dual Super User
Dual Super User

Re: Need Help to Update CDS DataCard from Radio Button control

Hi @DonBo 

 

what does the error message say?

what type of column is this in CDS?

DonBo
Level: Powered On

Re: Need Help to Update CDS DataCard from Radio Button control

Here is the error

 

Error message1.png

Dual Super User
Dual Super User

Re: Need Help to Update CDS DataCard from Radio Button control

Hi @DonBo 

 

since you are using an option set - you need to ensure the dropdown is being populated based on the Option set values

 

You have hardcoded "Yes" and "No" as text values and hence it will not be able to update it

DonBo
Level: Powered On

Re: Need Help to Update CDS DataCard from Radio Button control

OK.  I think you are on to something.  I need to replace the Items field that contains the current value ["Yes", "No"], with something like ThisItem.'Job Clean'?  Thanks for your help.  

DonBo
Level: Powered On

Re: Need Help to Update CDS DataCard from Radio Button control

ThisItem.'Job Clean' didn't work.  

Community Support Team
Community Support Team

Re: Need Help to Update CDS DataCard from Radio Button control

Hi @DonBo ,

Could you please share a bit more about the 'Job Clean', 'All Required Inspections Passed', 'All Required Work Complete',... column in your CDS Entity? Are they all Option Set type column with "Yes" and "No" available value?

 

I assume that the you added your Radio control within the Data cards in your Edit form, and these Option Set/Two Option type column has available options -- Yes & No, is it true?

 

I have made a test on my side, please take a try with the following workaround:

1. If the 'Job Clean', 'All Required Inspections Passed', 'All Required Work Complete',... are Option Set Type column in your CDS Entity:3.JPG

 

4.JPG

Unlock the ApprovalStatus Data card in Edit form, add a Radio control, set the Items property to following:

["Yes", "No"]

Set the Default property of the Radio control to following:

If(ThisItem.ApprovalStatus = [@ApprovalStatus].Approved, "Yes", "No")

On your side, you may need to type following formula:

If(
ThisItem.'Job Clean' = [@'Job Clean'].Yes, "Yes",
ThisItem.'Job Clean' = [@'Job Clean'].No, "No"
)

 

Set the Update property of the ApprovalStatus Data card to following:

If(
    Radio1.Selected.Value="Yes",
    [@ApprovalStatus].Approved,
    Radio1.Selected.Value="No",
    [@ApprovalStatus].Rejected
)

On your side, you may need to type following formula:

If(
    Radio1.Selected.Value="Yes",
    [@'Job Clean'].Yes,
    Radio1.Selected.Value="No",
    [@'Job Clean'].No
)

 

2. If the 'Job Clean', 'All Required Inspections Passed', 'All Required Work Complete',... are Two Option Type column in your CDS:

Set the Default property of the Radio control to following:

If(
ThisItem.'Job Clean' = 'Job Clean (YourEntityName)'.Yes, "Yes",
ThisItem.'Job Clean' = 'Job Clean (YourEntityName)'.No, "No"
)

Set the Update property of the ApprovalStatus Data card to following:

If(
    Radio1.Selected.Value="Yes",
    'Job Clean (YourEntityName)'.Yes,
    Radio1.Selected.Value="No",
   'Job Clean (YourEntityName)'.No
)

Please consider take a try with above solution, check if the issue is solved.

 

More details about modifing Option Set type column value, please check the following blog:

https://powerapps.microsoft.com/en-us/blog/option-sets-and-many-to-many-relationships-for-canvas-app...

 

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

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,975)