# Perspective custom property type inferring

**URL:** <https://forum.inductiveautomation.com/t/perspective-custom-property-type-inferring/70654>\
**Category:** Ignition\
**Tags:** perspective, ignition81\
**Created:** [March 6, 2023, 9:39am UTC](https://forum.inductiveautomation.com/t/perspective-custom-property-type-inferring/70654 "2023-03-06T09:39:24Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![pgmo](https://avatars.discourse-cdn.com/v4/letter/p/d07c76/32.png) [@pgmo](https://forum.inductiveautomation.com/u/pgmo)\
**Post date:** [March 6, 2023, 9:39am UTC](https://forum.inductiveautomation.com/t/perspective-custom-property-type-inferring/70654/1 "2023-03-06T09:39:24Z")

</div>

As I can understand, when I add a custom property to a _Perspective_ component, Ignition will infer the property data type from the value I assign.  
Sometimes I would like to let Ignition know what I mean. Next some examples:

- if I write `2023-03-06`, I'd like it to be a `date` rather then a `string` so that the property shows up with the calendar icon  
 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/6/8/68b352b5accc8950369be86f28b7328c8280df83.png)
- if I write `20230306`, I'd like it to be a `string` rather then a `number`:  
 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/3/3/33e7df1dacd87a66c4d8649970277567a0d831cc.png)

I cannot seem to find any way to force Ignition perspective property type definition, other then a button in my view which I click in _preview mode_ to set the custom property to the value and type I want.  
Any suggestion?

Thanks, regards

---

<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:** [March 6, 2023, 6:31pm UTC](https://forum.inductiveautomation.com/t/perspective-custom-property-type-inferring/70654/2 "2023-03-06T18:31:50Z")

</div>

At some point, we're planning to add the ability for you to define your own 'schema' for custom properties and view parameters; until then, your workaround is probably the best option.

> [@Perspective view custom property for color](https://forum.inductiveautomation.com/t/perspective-view-custom-property-for-color/47502/22):
>
> I think the color treatment is dictated by the property ‘schema’, which is the underlying meta-layer that attempts to marshal properties into the right shape. We’ve got a somewhat theoretical feature ticket planned that will expose some way to provide schemas to custom properties on a view - which would allow you (as the view designer) to “restrict” the input and output types.

---

<div class="post-metadata">

**Author:** ![pgmo](https://avatars.discourse-cdn.com/v4/letter/p/d07c76/32.png) [@pgmo](https://forum.inductiveautomation.com/u/pgmo)\
**Post date:** [March 6, 2023, 8:14pm UTC](https://forum.inductiveautomation.com/t/perspective-custom-property-type-inferring/70654/3 "2023-03-06T20:14:41Z")

</div>

Thanks @paul-griffith for your help.  
Regards

---

<div class="post-metadata">

**Author:** ![Remco\_Geervliet](https://avatars.discourse-cdn.com/v4/letter/r/13edae/32.png) [@Remco\_Geervliet](https://forum.inductiveautomation.com/u/Remco_Geervliet)\
**Post date:** [April 23, 2024, 7:00am UTC](https://forum.inductiveautomation.com/t/perspective-custom-property-type-inferring/70654/4 "2024-04-23T07:00:37Z")

</div>

Any news on this?

Running into this same issue, but with bool. 0/1 is defined as int, True/False as string.

---

<div class="post-metadata">

**Author:** ![Transistor](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/transistor/32/3380_2.png) [@Transistor](https://forum.inductiveautomation.com/u/Transistor)\
**Post date:** [April 23, 2024, 8:51am UTC](https://forum.inductiveautomation.com/t/perspective-custom-property-type-inferring/70654/5 "2024-04-23T08:51:38Z")

</div>

> [@Remco\_Geervliet](#):
>
> True/False as string.

Try `true` or `false` instead.
