# Expression Binding Behavior

**URL:** <https://forum.inductiveautomation.com/t/expression-binding-behavior/63352>\
**Category:** Ignition\
**Tags:** perspective\
**Created:** [August 23, 2022, 8:55pm UTC](https://forum.inductiveautomation.com/t/expression-binding-behavior/63352 "2022-08-23T20:55:52Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Tobias\_Goebeler](https://avatars.discourse-cdn.com/v4/letter/t/ecb155/32.png) [@Tobias\_Goebeler](https://forum.inductiveautomation.com/u/Tobias_Goebeler)\
**Post date:** [August 23, 2022, 8:55pm UTC](https://forum.inductiveautomation.com/t/expression-binding-behavior/63352/1 "2022-08-23T20:55:52Z")

</div>

I was following along with the Building in Perspective course and reached the end with everything working properly. I wanted to play around with it a bit by changing if a button is in its primary or secondary style depending on which station was currently selected. So I made an expression binding {view.params.stationNumber}!=1 for the Station 1 button, and everything was working properly in the designer, but nothing was happening in my Perspective session. After playing around a bit, I changed my binding to {view.params.stationNumber}!=“1” which caused it to have no effect in the designer, but now things behave as expected in the session.

Basically, I’m wondering if anyone knows why these two expressions are evaluated differently in the designer and Perspective session. It seems as though the parameter is treated as an integer in the designer and a string literal in the session and I don’t know why.

---

<div class="post-metadata">

**Author:** ![cmallonee](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/cmallonee/32/6416_2.png) [@cmallonee](https://forum.inductiveautomation.com/u/cmallonee)\
**Post date:** [August 24, 2022, 2:38am UTC](https://forum.inductiveautomation.com/t/expression-binding-behavior/63352/2 "2022-08-24T02:38:44Z")

</div>

The Designer and Session don’t evaluate the expression differently. The only time you’d see different results is if `view.params.stationNumber` has a different value between the two locations.  
`{view.params.stationNumber}!=1` translates to “The prop is not equal to the INTEGER `1`.”  
`{view.params.stationNumber}!="1"` translates to “The prop is not equal to the STRING `"1"`.”

If you’re seeing different behavior, check how you’re supplying the value to `view.params.stationNumber`. It sounds like you’re expecting a number but encountering a string. So either your code is supplying a string, or you’ve passed parameters via URL, where everything is interpreted as a string. How are you setting `view.params.stationNumber}`?

---

<div class="post-metadata">

**Author:** ![Tobias\_Goebeler](https://avatars.discourse-cdn.com/v4/letter/t/ecb155/32.png) [@Tobias\_Goebeler](https://forum.inductiveautomation.com/u/Tobias_Goebeler)\
**Post date:** [August 24, 2022, 3:11am UTC](https://forum.inductiveautomation.com/t/expression-binding-behavior/63352/3 "2022-08-24T03:11:44Z")

</div>

I was passing stationNumber in as a URL parameter, should have realized that would be a string. Thank you!
