# Typecasting

**URL:** <https://forum.inductiveautomation.com/t/typecasting/4660>\
**Category:** Ignition\
**Created:** [June 19, 2012, 3:03pm UTC](https://forum.inductiveautomation.com/t/typecasting/4660 "2012-06-19T15:03:44Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![tailfire](https://avatars.discourse-cdn.com/v4/letter/t/b5a626/32.png) [@tailfire](https://forum.inductiveautomation.com/u/tailfire)\
**Post date:** [June 19, 2012, 3:03pm UTC](https://forum.inductiveautomation.com/t/typecasting/4660/1 "2012-06-19T15:03:44Z")

</div>

I did some searching for topics related to this and didn’t find what I was looking for.  
I have also already used what was in the manual with little success.  
I am having issues creating a quite simple expression using the selected value of a drop down list. Attached is a quick screenshot. It seems like this expression should be simple. Was hoping the forum could indicate why It is being so difficult/ what i am not doing correct…

 ![](https://us1.discourse-cdn.com/inductiveautomation/original/2X/e/e65035d422a26c3480c4171c3fd6b23a0eb7a201.png)

---

<div class="post-metadata">

**Author:** ![Kevin.Herron](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kevin.herron/32/7259_2.png) [@Kevin.Herron](https://forum.inductiveautomation.com/u/Kevin.Herron)\
**Post date:** [June 19, 2012, 3:10pm UTC](https://forum.inductiveautomation.com/t/typecasting/4660/2 "2012-06-19T15:10:36Z")

</div>

Looks like you’re trying to cast a float/double value (.10) to an int, which isn’t going to give you the results you want.

Try toFloat() or toDouble().

---

<div class="post-metadata">

**Author:** ![tailfire](https://avatars.discourse-cdn.com/v4/letter/t/b5a626/32.png) [@tailfire](https://forum.inductiveautomation.com/u/tailfire)\
**Post date:** [June 19, 2012, 4:02pm UTC](https://forum.inductiveautomation.com/t/typecasting/4660/3 "2012-06-19T16:02:06Z")

</div>

ToFloat Worked perfect!!!  
Time for the webinar!
