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

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
New Badges

New Solution Badges!

Check out our new profile badges recognizing authored solutions!

New Power Super Users

Congratulations!

We are excited to announce the Power Apps Super Users!

Power Apps Community Call

Power Apps Community Call: February

Did you miss the call? Check out the Power Apps Community Call here.

Microsoft Ignite

Microsoft Ignite

Join digitally, March 2–4, 2021 to explore new tech that's ready to implement. Experience the keynote in mixed reality through AltspaceVR!

Top Solution Authors
Top Kudoed Authors
Users online (16,525)