# Inverse Checkbox command

**URL:** <https://forum.inductiveautomation.com/t/inverse-checkbox-command/94393>\
**Category:** Ignition\
**Tags:** perspective\
**Created:** [August 9, 2024, 6:39am UTC](https://forum.inductiveautomation.com/t/inverse-checkbox-command/94393 "2024-08-09T06:39:20Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Andres\_Gallardo](https://avatars.discourse-cdn.com/v4/letter/a/a8b319/32.png) [@Andres\_Gallardo](https://forum.inductiveautomation.com/u/Andres_Gallardo)\
**Post date:** [August 9, 2024, 6:39am UTC](https://forum.inductiveautomation.com/t/inverse-checkbox-command/94393/1 "2024-08-09T06:39:20Z")

</div>

Hello,

I have been struggling for a while to implement a "reverse checkbox" using the built-in checkbox in Perspective. I want it to send a 0 (false) to the PLC tag when the checkbox is checked, and send a 1 (true) when the checkbox is unchecked.

I tried adding a transform, but when I select the transform, the bidirectional option automatically gets grayed out and nothing works. Does anyone has an idea to sorting out this?

Below you can see the "Biderccional" grayed out.

 ![Screenshot 2024-08-09 at 2.29.49 AM](https://us1.discourse-cdn.com/inductiveautomation/original/3X/5/7/5758b993272766bdf97cdabd94c52382f919b575.png)

Thanks in advance!

---

<div class="post-metadata">

**Author:** ![Hayden\_Watson](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/hayden_watson/32/48792_2.png) [@Hayden\_Watson](https://forum.inductiveautomation.com/u/Hayden_Watson)\
**Post date:** [August 9, 2024, 6:51am UTC](https://forum.inductiveautomation.com/t/inverse-checkbox-command/94393/2 "2024-08-09T06:51:46Z")

</div>

You can't do bidirectional when you have a transform.

I would create a custom property that has your indirect binding to a tag, and in this binding put an expression or script transform to write to that custom property.

---

<div class="post-metadata">

**Author:** ![Transistor](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/transistor/32/3380_2.png) [@Transistor](https://forum.inductiveautomation.com/u/Transistor)\
**Post date:** [August 9, 2024, 8:00am UTC](https://forum.inductiveautomation.com/t/inverse-checkbox-command/94393/3 "2024-08-09T08:00:04Z")

</div>

Just a general comment on the Map Transform: Since the input can only be false or true you can configure it as,

```python
Input Output
false true
Fallback false
```

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [August 9, 2024, 11:03am UTC](https://forum.inductiveautomation.com/t/inverse-checkbox-command/94393/4 "2024-08-09T11:03:50Z")

</div>

You could also use a derived tag that performs the boolean "not" in both directions.
