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

Checkboxes and relate function

I am using check boxes to put items into the CDS using the relate function, but when i check the box, it unchecks iself. Does anyone have a solution?

1 ACCEPTED SOLUTION

Accepted Solutions
v-xida-msft
Community Support
Community Support

HI @LoneWolf47 ,

Could you please share a bit more about your scenario?

Do you want to related some records from another Entity into current Entity?

Further, could you please show more details about the Relate formula you used in your app?

 

Please consider take a try to set the OnSelect property of the Checkbox to following:

If(
   Checkbox1.Value = true,
   Relate(Entity1RelatedTable, Entity2Record),
   Unrelate(Entity1RelatedTable, Entity2Record)
)

More details about the Relate and Unrelate function, please check the following article:

https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/functions/function-relate-unrelate#synt...

 

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

5 REPLIES 5
PytByt
Post Prodigy
Post Prodigy

Hi @LoneWolf47 

Do you want to write items right away into the CDS when you check the check box?
If so, have you tried using patch formula in OnCheck property of the checkbox?

Regards,
PytByt

v-xida-msft
Community Support
Community Support

HI @LoneWolf47 ,

Could you please share a bit more about your scenario?

Do you want to related some records from another Entity into current Entity?

Further, could you please show more details about the Relate formula you used in your app?

 

Please consider take a try to set the OnSelect property of the Checkbox to following:

If(
   Checkbox1.Value = true,
   Relate(Entity1RelatedTable, Entity2Record),
   Unrelate(Entity1RelatedTable, Entity2Record)
)

More details about the Relate and Unrelate function, please check the following article:

https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/functions/function-relate-unrelate#synt...

 

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

I actually was able to figure it out. Thanks!

I was able to find another way to do it. Thanks!

I had to circle back around to the checkboxes because the other way i found was creating other issues, so i came back to this, and your suggestion worked. Thank you so much!

Helpful resources

Announcements
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!

secondImage

Are Your Ready?

Test your skills now with the Cloud Skill Challenge.

Top Solution Authors
Top Kudoed Authors
Users online (72,558)