# Perspective - len expression doesn't work with an array args?

**URL:** <https://forum.inductiveautomation.com/t/perspective-len-expression-doesnt-work-with-an-array-args/42108>\
**Category:** Ignition\
**Tags:** perspective, ignition80\
**Created:** [January 11, 2021, 8:53am UTC](https://forum.inductiveautomation.com/t/perspective-len-expression-doesnt-work-with-an-array-args/42108 "2021-01-11T08:53:37Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![mazeyrat](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/mazeyrat/32/10955_2.png) [@mazeyrat](https://forum.inductiveautomation.com/u/mazeyrat)\
**Post date:** [January 11, 2021, 8:53am UTC](https://forum.inductiveautomation.com/t/perspective-len-expression-doesnt-work-with-an-array-args/42108/1 "2021-01-11T08:53:37Z")

</div>

**Ignition 8.1.1**

len expression doesn’t work with an array args ???  
How to obtain the length of the array ?

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

---

<div class="post-metadata">

**Author:** ![deon.korb](https://avatars.discourse-cdn.com/v4/letter/d/8c91f0/32.png) [@deon.korb](https://forum.inductiveautomation.com/u/deon.korb)\
**Post date:** [January 11, 2021, 9:27am UTC](https://forum.inductiveautomation.com/t/perspective-len-expression-doesnt-work-with-an-array-args/42108/2 "2021-01-11T09:27:40Z")

</div>

It seems that only works for strings.

Maybe try using a script transform and return the length there?

---

<div class="post-metadata">

**Author:** ![mazeyrat](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/mazeyrat/32/10955_2.png) [@mazeyrat](https://forum.inductiveautomation.com/u/mazeyrat)\
**Post date:** [January 11, 2021, 9:53am UTC](https://forum.inductiveautomation.com/t/perspective-len-expression-doesnt-work-with-an-array-args/42108/3 "2021-01-11T09:53:16Z")

</div>

Thanks ! it works fine with script transform and:

```auto
return len(value)

```

---

<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:** [January 11, 2021, 4:34pm UTC](https://forum.inductiveautomation.com/t/perspective-len-expression-doesnt-work-with-an-array-args/42108/4 "2021-01-11T16:34:30Z")

</div>

This is a planned future enhancement for the `len` function.
