cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
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
Highlighted
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
Highlighted
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

Highlighted
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

Highlighted
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?

Highlighted
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

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

Highlighted
Frequent Visitor

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

ThisItem.'Job Clean' didn't work.  

Highlighted
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
August 2020 Community Challenge: Can You Solve These?

August 2020 Community Challenge: Can You Solve These?

We're excited to announce our first cross-community 'Can You Solve These?' challenge!

secondImage

Return to Workplace

Reopen responsibly, monitor intelligently, and protect continuously with solutions for a safer work environment.

secondImage

Super Users Coming in August

We are excited for the next Super User season.

secondImage

Community User Group Member Badges

FIll out a quick form to claim your community user group member badge today!

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (9,116)