# Dynamic Expression?

**URL:** <https://forum.inductiveautomation.com/t/dynamic-expression/113825>\
**Category:** Ignition\
**Tags:** perspective, ignition81\
**Created:** [February 6, 2026, 9:28pm UTC](https://forum.inductiveautomation.com/t/dynamic-expression/113825 "2026-02-06T21:28:17Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![drewdin](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/drewdin/32/3363_2.png) [@drewdin](https://forum.inductiveautomation.com/u/drewdin)\
**Post date:** [February 6, 2026, 9:28pm UTC](https://forum.inductiveautomation.com/t/dynamic-expression/113825/1 "2026-02-06T21:28:17Z")

</div>

I have a custom param on my view that’s an array. I have some buttons where I want to iterate the array and show the values on the screen. I have a label on the screen with an expression showing the value, the problem is that I cant figure out to to make the expression dynamic so I can iterate.

I got it working by changing the expression to now() and then using a script transform to build the path and get the value. Is that the right way or do you prefer something else? Thanks!

---

<div class="post-metadata">

**Author:** ![ryan.white](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/ryan.white/32/73193_2.png) [@ryan.white](https://forum.inductiveautomation.com/u/ryan.white)\
**Post date:** [February 6, 2026, 9:42pm UTC](https://forum.inductiveautomation.com/t/dynamic-expression/113825/2 "2026-02-06T21:42:13Z")

</div>

Does `{view.param.datavalue}[{view.custom.selectedIndex}]` or something along that line not work?  
You could always build the path to the property using [`property`](https://www.docs.inductiveautomation.com/docs/8.1/appendix/expression-functions/advanced/property), something like `property(stringFormat("view.params.dataValue[%d]", {view.custom.selectedIndex}))`

---

<div class="post-metadata">

**Author:** ![Nol](https://avatars.discourse-cdn.com/v4/letter/n/8e8cbc/32.png) [@Nol](https://forum.inductiveautomation.com/u/Nol)\
**Post date:** [February 6, 2026, 9:44pm UTC](https://forum.inductiveautomation.com/t/dynamic-expression/113825/3 "2026-02-06T21:44:59Z")

</div>

Create an custom.index tag

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

On your buttons you increment and reset the index using the array length as a boundary

```python
def runAction(self, event):
	options = len(self.view.custom.lunch)
	if options > 0:
		self.view.custom.index = (self.view.custom.index + 1) % options

```

On your label you point it to the overall array and the index number to select the value you want

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

---

<div class="post-metadata">

**Author:** ![ryan.white](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/ryan.white/32/73193_2.png) [@ryan.white](https://forum.inductiveautomation.com/u/ryan.white)\
**Post date:** [February 6, 2026, 9:50pm UTC](https://forum.inductiveautomation.com/t/dynamic-expression/113825/4 "2026-02-06T21:50:40Z")

</div>

> [@Nol](#):
>
> tag

property, not tag.

> [@Nol](#):
>
> transform expression

Unnecessary and expensive, expressions allow dynamic indexes when accessing members in an array. Just make the binding an expression binding of `{view.custom.lunch}[{view.custom.index}]`.

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

---

<div class="post-metadata">

**Author:** ![Nol](https://avatars.discourse-cdn.com/v4/letter/n/8e8cbc/32.png) [@Nol](https://forum.inductiveautomation.com/u/Nol)\
**Post date:** [February 6, 2026, 9:54pm UTC](https://forum.inductiveautomation.com/t/dynamic-expression/113825/5 "2026-02-06T21:54:19Z")

</div>

Valid point, I switched the binding type

---

<div class="post-metadata">

**Author:** ![drewdin](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/drewdin/32/3363_2.png) [@drewdin](https://forum.inductiveautomation.com/u/drewdin)\
**Post date:** [February 10, 2026, 10:13pm UTC](https://forum.inductiveautomation.com/t/dynamic-expression/113825/6 "2026-02-10T22:13:06Z")

</div>

Sorry for the late response but that worked, I forgot about that functionality. Thanks again!
