# Cast issue when attempting to pass an integer value from a parent view to an embedded view

**URL:** <https://forum.inductiveautomation.com/t/cast-issue-when-attempting-to-pass-an-integer-value-from-a-parent-view-to-an-embedded-view/83250>\
**Category:** Ignition\
**Tags:** ignition81, perspective\
**Created:** [December 18, 2023, 12:15pm UTC](https://forum.inductiveautomation.com/t/cast-issue-when-attempting-to-pass-an-integer-value-from-a-parent-view-to-an-embedded-view/83250 "2023-12-18T12:15:47Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Gabriele\_Basigli](https://avatars.discourse-cdn.com/v4/letter/g/b5a626/32.png) [@Gabriele\_Basigli](https://forum.inductiveautomation.com/u/Gabriele_Basigli)\
**Post date:** [December 18, 2023, 12:15pm UTC](https://forum.inductiveautomation.com/t/cast-issue-when-attempting-to-pass-an-integer-value-from-a-parent-view-to-an-embedded-view/83250/1 "2023-12-18T12:15:47Z")

</div>

The issue involves automatic type casting to a long when passing an integer as a parameter to a subview.

For demonstrative purposes, I have created a parent view and a subview that takes an input parameter, displaying the type of the input parameter through a label.  
This is the subview:  
 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/9/d/9d291b2981b5f360904f91afd71013cfcc9c82da.png)

This is the parameter passed to the subview:

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

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [December 18, 2023, 12:57pm UTC](https://forum.inductiveautomation.com/t/cast-issue-when-attempting-to-pass-an-integer-value-from-a-parent-view-to-an-embedded-view/83250/2 "2023-12-18T12:57:07Z")

</div>

Everything that is assigned to a Perspective property or parameter is coerced into a JSON-compatible form. JSON doesn't distinguish between 32-bit and 64-bit integers, so that difference is lost.

Wherever you really need such datatype information, you will have to separate it into another property or parameter, before any assignment to any Perspective property.
