# \[BUG\] Overlay Opt-Out doesn't work reading invalid tagpaths (".CanWrite")

**URL:** <https://forum.inductiveautomation.com/t/bug-overlay-opt-out-doesnt-work-reading-invalid-tagpaths-canwrite/71204>\
**Category:** Ignition\
**Created:** [March 17, 2023, 3:15am UTC](https://forum.inductiveautomation.com/t/bug-overlay-opt-out-doesnt-work-reading-invalid-tagpaths-canwrite/71204 "2023-03-17T03:15:22Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![nminchin](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/nminchin/32/6911_2.png) [@nminchin](https://forum.inductiveautomation.com/u/nminchin)\
**Post date:** [March 17, 2023, 3:15am UTC](https://forum.inductiveautomation.com/t/bug-overlay-opt-out-doesnt-work-reading-invalid-tagpaths-canwrite/71204/1 "2023-03-17T03:15:22Z")

</div>

v8.1.25

I have a View template that can accept a number of different options, and in some combinations, a binding is trying to read ".CanWrite" which results in an error displayed, despite "Overlay Opt-Out" checked on the binding:  
 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/f/e/feb5eac3081bc1cb0305370c862e91db4773630d.png)

"Tag properties can only occur after a tag name"

I'm using an expression transform to check if the tag is available, and ignore it if not:

```auto
if(isAvailable({value}), {value}, true)

```

---

<div class="post-metadata">

**Author:** ![paul-griffith](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul-griffith/32/37249_2.png) [@paul-griffith](https://forum.inductiveautomation.com/u/paul-griffith)\
**Post date:** [March 17, 2023, 5:07am UTC](https://forum.inductiveautomation.com/t/bug-overlay-opt-out-doesnt-work-reading-invalid-tagpaths-canwrite/71204/2 "2023-03-17T05:07:08Z")

</div>

I don't think overlay opt out is doing anything, because the issue here isn't the quality of the internal value, it's something about the syntax of the path you're checking itself. I would expect `try()` in the expression to work to suppress this... though the screenshot doesn't make sense with the error you're getting. Any kind of SSCCE or reproducible view you can upload would be interesting to look at.

---

<div class="post-metadata">

**Author:** ![nminchin](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/nminchin/32/6911_2.png) [@nminchin](https://forum.inductiveautomation.com/u/nminchin)\
**Post date:** [March 17, 2023, 5:13am UTC](https://forum.inductiveautomation.com/t/bug-overlay-opt-out-doesnt-work-reading-invalid-tagpaths-canwrite/71204/3 "2023-03-17T05:13:09Z")

</div>

I'll use `try` instead, but here's an example below. JSON of a simple View:

```auto
{
  "custom": {},
  "params": {},
  "props": {
    "defaultSize": {
      "height": 343,
      "width": 531
    }
  },
  "root": {
    "children": [
      {
        "meta": {
          "name": "Label"
        },
        "position": {
          "basis": "251px"
        },
        "propConfig": {
          "props.text": {
            "binding": {
              "config": {
                "fallbackDelay": 2.5,
                "mode": "direct",
                "tagPath": ".CanWrite"
              },
              "transforms": [
                {
                  "expression": "if(isAvailable({value}), {value}, -1)",
                  "type": "expression"
                }
              ],
              "type": "tag"
            }
          }
        },
        "type": "ia.display.label"
      }
    ],
    "meta": {
      "name": "root"
    },
    "props": {
      "direction": "column"
    },
    "type": "ia.container.flex"
  }
}

```

Edit: I had to put the binding on the `props.text` instead of a custom key for the error overlay to show up

---

<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:** [March 17, 2023, 8:47am UTC](https://forum.inductiveautomation.com/t/bug-overlay-opt-out-doesnt-work-reading-invalid-tagpaths-canwrite/71204/4 "2023-03-17T08:47:17Z")

</div>

Psst! I don't think the `if()` expression function does any short-circuiting, so your tag is evaluated regardless of `isAvailable()` result.
