# Query regarding expression binding in perspective

**URL:** <https://forum.inductiveautomation.com/t/query-regarding-expression-binding-in-perspective/37752>\
**Category:** Ignition\
**Created:** [August 14, 2020, 9:23pm UTC](https://forum.inductiveautomation.com/t/query-regarding-expression-binding-in-perspective/37752 "2020-08-14T21:23:56Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![yash.bhan](https://avatars.discourse-cdn.com/v4/letter/y/bbe5ce/32.png) [@yash.bhan](https://forum.inductiveautomation.com/u/yash.bhan)\
**Post date:** [August 14, 2020, 9:23pm UTC](https://forum.inductiveautomation.com/t/query-regarding-expression-binding-in-perspective/37752/1 "2020-08-14T21:23:56Z")

</div>

Hi

I'm trying to bind an expression to the backgroundColor property of a label in Perspective module, the expression checks if the value of a given tag is 1 or 0 and accordingly returns a color.

The tag path of the tag is dynamic

> if(tag("[default]Project\_ABC/Pune/" + {session.custom.currentLabel} + "/Line\_Status").value = 1, '#00D900','#FF4747')

However when I create this expression in Binding Preview it shows Error\_Configuration, and after saving it gives an the error on the component when viewed on the browser.

Wanted to know if the expression is correctly configured or I've made some mistake.

PS. When I try to use a hardcoded tag path it works. i.e. the following expression works

> if({[default]Project\_ABC/Pune/MC1/Line\_Status} = 1, '#00D900','#FF4747')

---

<div class="post-metadata">

**Author:** ![JordanCClark](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/jordancclark/32/83362_2.png) [@JordanCClark](https://forum.inductiveautomation.com/u/JordanCClark)\
**Post date:** [August 15, 2020, 12:30pm UTC](https://forum.inductiveautomation.com/t/query-regarding-expression-binding-in-perspective/37752/2 "2020-08-15T12:30:32Z")

</div>

Use an indirect tag binding, then add a map transform to get your desired result.

 ![2020-08-15_8-29-20](https://us1.discourse-cdn.com/inductiveautomation/original/3X/9/5/95fba80331efb58db2fb79e5e8fba6310d89ee57.png)

---

<div class="post-metadata">

**Author:** ![yash.bhan](https://avatars.discourse-cdn.com/v4/letter/y/bbe5ce/32.png) [@yash.bhan](https://forum.inductiveautomation.com/u/yash.bhan)\
**Post date:** [August 18, 2020, 4:45am UTC](https://forum.inductiveautomation.com/t/query-regarding-expression-binding-in-perspective/37752/3 "2020-08-18T04:45:20Z")

</div>

Thank you so much!
