# Indicator Block explicit string expression evaluation not working as expected

**URL:** https://forums.losant.com/t/indicator-block-explicit-string-expression-evaluation-not-working-as-expected/3727
**Category:** Help
**Tags:** indicator-block
**Created:** [April 12, 2021, 3:03am UTC](https://forums.losant.com/t/indicator-block-explicit-string-expression-evaluation-not-working-as-expected/3727 "2021-04-12T03:03:33Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![Andrew\_Leckie1](https://sea1.discourse-cdn.com/flex015/user_avatar/forums.losant.com/andrew_leckie1/32/3319_2.png) [@Andrew\_Leckie1](https://forums.losant.com/u/Andrew_Leckie1)
#### Post date: [April 12, 2021, 3:03am UTC](https://forums.losant.com/t/indicator-block-explicit-string-expression-evaluation-not-working-as-expected/3727/1 "2021-04-12T03:03:33Z")

</div>

Hello,  
I have a dashboard Indicator block configured for Live Stream updates, with with the following expression: {{value-0}} === ‘open’ which is an evaluation of a string attribute on a device, for which a custom decoding workflow will set to either “open” or “closed” on the updated payload path at “data.decoded.door” beforehand, which is then used to set the actual device string attribute named “DoorState” in a “Device: State” workflow node. I can verify this attribute state is occurring as expected from dumping it into a DataTable also. However, I cannot get the Indicator block to properly evaluate the {{value-0}} === ‘open’ & {{value-0}} === ‘closed’ string expressions and select the different colour indicators as configured. It always triggers the Default state and colour on a live update. As far as I can tell from your Expression evaluation and other documentation, this should work as it should be being treated as a JavaScript string comparison.

 ![Indicator Block top half definition](https://us1.discourse-cdn.com/flex015/uploads/getstructure/original/2X/1/19430f9ea452f9fd11909112790d69c509e220e0.png)  
 ![Indicator Block bottom half definition](https://us1.discourse-cdn.com/flex015/uploads/getstructure/original/2X/6/671d4d73d06355f4caf02984916211d926fa03df.png)  
 ![Decoding workflow debug trace](https://us1.discourse-cdn.com/flex015/uploads/getstructure/original/2X/5/5761abe0d7e7db747fb1fc548fdc415032fa6cce.png)

I also cannot get the Indicator Block text or label to dynamically update from the Handlebars style Door Status {{data.decoded.door}} definitions either.

Am I missing something here?

---

<div class="post-metadata">

### Author: ![Andrew\_Leckie1](https://sea1.discourse-cdn.com/flex015/user_avatar/forums.losant.com/andrew_leckie1/32/3319_2.png) [@Andrew\_Leckie1](https://forums.losant.com/u/Andrew_Leckie1)
#### Post date: [April 12, 2021, 7:42am UTC](https://forums.losant.com/t/indicator-block-explicit-string-expression-evaluation-not-working-as-expected/3727/3 "2021-04-12T07:42:39Z")

</div>

Hello,  
after reviewing the “Device State” node documentation here [https://docs.losant.com/workflows/outputs/device-state](https://docs.losant.com/workflows/outputs/device-state) (more than a few times I might add!) , observed the very small example screenshot that highlighted that the Handlebars style “{{” & “}}” braces are needed when assigning values to individual field attributes. After correcting this, I now have the Indicator Block string expression evaluation logic working as expected.

 ![Decoding workflow debug trace (fixed)](https://us1.discourse-cdn.com/flex015/uploads/getstructure/original/2X/c/ce9c85fe1f6e1e6ed3c7e4a909b7d2e9ce10bf97.png)

---

<div class="post-metadata">

### Author: ![Brandon\_Cannaday](https://sea1.discourse-cdn.com/flex015/user_avatar/forums.losant.com/brandon_cannaday/32/14_2.png) [@Brandon\_Cannaday](https://forums.losant.com/u/Brandon_Cannaday)
#### Post date: [April 12, 2021, 1:23pm UTC](https://forums.losant.com/t/indicator-block-explicit-string-expression-evaluation-not-working-as-expected/3727/5 "2021-04-12T13:23:36Z")

</div>

Hey @Andrew_Leckie1,

Glad you found the solution! I’ve submitted a ticket to improve the documentation to make it more clear that those fields are template fields that require curly braces.
