# XPath Check not working in input

**URL:** <https://dmap-community.ductus.global/t/xpath-check-not-working-in-input/1275>\
**Category:** YANG\
**Created:** [June 1, 2017, 6:41am UTC](https://dmap-community.ductus.global/t/xpath-check-not-working-in-input/1275 "2017-06-01T06:41:27Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![bkannadassan](https://avatars.discourse-cdn.com/v4/letter/b/f6c823/32.png) [@bkannadassan](https://dmap-community.ductus.global/u/bkannadassan)\
**Post date:** [June 1, 2017, 6:41am UTC](https://dmap-community.ductus.global/t/xpath-check-not-working-in-input/1275/1 "2017-06-01T06:41:27Z")

</div>

```
 54 container service {
 55 tailf:action ppeer-statistics {
 56 input {
 57 leaf typeer {
 58 type string;
 59 }
 60 choice service-type {
 61 container smtp {
 62 tailf:display-when '../typeer != ""';
 63 presence "SMTP enabled";
 64 leaf smtp-relay {
 65 mandatory true;
 66 type boolean;
 67 }
 68 leaf use-virtual-mbox {
 69 type boolean;
 70 }
 71 }
 72 }
 73 }
 74 output {
 75 leaf result { type string; }
 76 }
 77 }
 78 }

```

- 

Hi All

Display when check is not working inside input. When I don’t have input and output its working. Please let me know if I am missing something…

rgds  
Balaji Kamal Kannadassan

---

<div class="post-metadata">

**Author:** ![cohult](https://yyz2.discourse-cdn.com/flex010/user_avatar/dmap-community.ductus.global/cohult/32/221_2.png) [@cohult](https://dmap-community.ductus.global/u/cohult)\
**Post date:** [June 14, 2017, 9:27am UTC](https://dmap-community.ductus.global/t/xpath-check-not-working-in-input/1275/2 "2017-06-14T09:27:12Z")

</div>

You are right, that display:when (or a YANG when statement for that matter) does not work when inside an “input” statement. I don’t know if it is a bug or by design.  
If you have access to Tail-f support, I suggest you file a ticket.

---

<div class="post-metadata">

**Author:** ![Sumeet](https://avatars.discourse-cdn.com/v4/letter/s/ba8739/32.png) [@Sumeet](https://dmap-community.ductus.global/u/Sumeet)\
**Post date:** [April 18, 2019, 4:44pm UTC](https://dmap-community.ductus.global/t/xpath-check-not-working-in-input/1275/3 "2019-04-18T16:44:51Z")

</div>

I am facing same issue. In input tag, xpath check is not working as expected. Is this bug resolved?

Thanks,  
Sumeet
