cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
DonBo
Frequent Visitor

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
Community Support

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
Frequent Visitor

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
Frequent Visitor

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

Here is the error

 

Error message1.png

Highlighted
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
Frequent Visitor

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
Frequent Visitor

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

ThisItem.'Job Clean' didn't work.  

Community Support
Community Support

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
MBAS Gallery 2020

MBAS Gallery 2020

Watch Microsoft Business Applications Summit sessions on-demand.

Attending MBAS? Claim your badge

Attending MBAS? Claim your badge

Whether you’re streaming the digital event live, or watching on-demand, claim your attendee badge to sport on your profile.

‘Better Together’ T-Shirt Contest – Winner Announced!

‘Better Together’ T-Shirt Contest – Winner Announced!

And the winner is...

firstImage

New Ranks and Rank Icons released on April 21!

The time has come: We are finally able to share more details on the brand-new ranks coming to the Power Apps Community!

Power Platform 2020 release wave 1 plan

Power Platform 2020 release wave 1 plan

Features releasing from April 2020 through September 2020

‘Better Together’ Integration Forum Launch

‘Better Together’ Integration Forum Launch

We're launching a how-to forum where you can learn about how Power BI integrates with other Power Platform products.

Emergency Response & Monitoring Solution

Emergency Response & Monitoring Solution

Microsoft has created a regional government emergency response and monitoring solution that is built on Power Apps and Power BI.

Top Solution Authors
Top Kudoed Authors
Users online (5,623)