# Transform Map Expression Not working properly

**URL:** <https://forum.inductiveautomation.com/t/transform-map-expression-not-working-properly/105780>\
**Category:** Ignition\
**Created:** [May 1, 2025, 2:53pm UTC](https://forum.inductiveautomation.com/t/transform-map-expression-not-working-properly/105780 "2025-05-01T14:53:52Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Paulo\_Custodio](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paulo_custodio/32/56599_2.png) [@Paulo\_Custodio](https://forum.inductiveautomation.com/u/Paulo_Custodio)\
**Post date:** [May 1, 2025, 2:53pm UTC](https://forum.inductiveautomation.com/t/transform-map-expression-not-working-properly/105780/1 "2025-05-01T14:53:52Z")

</div>

Can anyone help me here? Wasn't this supposed to return red instead of black?

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/9/7/9787c9f31c6aeeb98bdc1b4c9b1ecbcf8f501c61.png)

---

<div class="post-metadata">

**Author:** ![Leor\_Fishman](https://avatars.discourse-cdn.com/v4/letter/l/e19adc/32.png) [@Leor\_Fishman](https://forum.inductiveautomation.com/u/Leor_Fishman)\
**Post date:** [May 1, 2025, 5:01pm UTC](https://forum.inductiveautomation.com/t/transform-map-expression-not-working-properly/105780/2 "2025-05-01T17:01:45Z")

</div>

Naive suggestion: should it be {value}["running"]==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:** [May 1, 2025, 5:13pm UTC](https://forum.inductiveautomation.com/t/transform-map-expression-not-working-properly/105780/3 "2025-05-01T17:13:22Z")

</div>

There might be an underlying issue with extracting values from an expression structure in a map transform, I'm not sure...

But either way, this seems like a bad structural choice.  
If the states are mutually exclusive (surely stopped is the inverse of running) then you only need one boolean.  
If you truly want to represent all possible states of the two booleans aggregated, then use an expression (not an expression structure) binding and the [`binEnc`](https://docs.inductiveautomation.com/docs/8.1/appendix/expression-functions/logic/binEnc) function, so that you can represent an actual truth table - two bits makes _four_ possible states.

---

<div class="post-metadata">

**Author:** ![Paulo\_Custodio](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paulo_custodio/32/56599_2.png) [@Paulo\_Custodio](https://forum.inductiveautomation.com/u/Paulo_Custodio)\
**Post date:** [May 1, 2025, 5:19pm UTC](https://forum.inductiveautomation.com/t/transform-map-expression-not-working-properly/105780/4 "2025-05-01T17:19:01Z")

</div>

Thanks Leor, but it didnt work.

---

<div class="post-metadata">

**Author:** ![Paulo\_Custodio](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paulo_custodio/32/56599_2.png) [@Paulo\_Custodio](https://forum.inductiveautomation.com/u/Paulo_Custodio)\
**Post date:** [May 1, 2025, 5:20pm UTC](https://forum.inductiveautomation.com/t/transform-map-expression-not-working-properly/105780/5 "2025-05-01T17:20:40Z")

</div>

Yeah, I know.  
I'm doing it differently, this is just an example.  
I liked the binEnc idea, I'll try that. Thank you!
