# How to best create flex repeater parameter dictionaries?

**URL:** <https://forum.inductiveautomation.com/t/how-to-best-create-flex-repeater-parameter-dictionaries/102583>\
**Category:** Ignition\
**Tags:** perspective\
**Created:** [February 19, 2025, 7:07pm UTC](https://forum.inductiveautomation.com/t/how-to-best-create-flex-repeater-parameter-dictionaries/102583 "2025-02-19T19:07:43Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Simon\_Hathout\_Willar](https://avatars.discourse-cdn.com/v4/letter/s/3da27b/32.png) [@Simon\_Hathout\_Willar](https://forum.inductiveautomation.com/u/Simon_Hathout_Willar)\
**Post date:** [February 19, 2025, 7:07pm UTC](https://forum.inductiveautomation.com/t/how-to-best-create-flex-repeater-parameter-dictionaries/102583/1 "2025-02-19T19:07:43Z")

</div>

Hello.

I am learning Perspective, to build dashboards for a factory setting.

I often find myself wanting to create a flex repeater, where the elements in the flex repeater depend on parameters of a view.

Eg, I have a parameterized view which takes in a list of machine names (it is further embedded into a larger dashboard). This view includes a chart of machine performance, as well as some KPIs. These KPI labels are created as a flex repeater. Each KPI label view takes a machine name as an input, and displays the boxed percentage.

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

However, going from the list of strings I pass into the parameterized view, to the list of objects required in the flex repeater, is a bit of a hassle. Right now, I have the current setup:

The "instances" prop on my flex repeater is bound with the expression

```python
runScript("perspective_functions.list_to_list_of_dicts", 50000,{view.params.machine_names}, "machine_name")

```

and the associated script is

```python
def list_to_list_of_dicts(list_of_items, key_name) :
	out_list = []
	
	for item in list_of_items :
		out_list.append({
			key_name: item
			})
	
	return out_list

```

However, this feels a bit bulky -- I'm not sure how much to worry about the performance impacts of these scripts (although I've mitigated this somewhat by having them call only rarely -- the machines should be constant over a session)

Is there a clever way I can do this solely within the expression language, without having to resort to scripting?

---

<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 19, 2025, 7:25pm UTC](https://forum.inductiveautomation.com/t/how-to-best-create-flex-repeater-parameter-dictionaries/102583/2 "2025-02-19T19:25:41Z")

</div>

> [@Simon\_Hathout\_Willar](#):
>
> Is there a clever way I can do this solely within the expression language, without having to resort to scripting?

Not in base Ignition, there is no iteration in the expression language.

HOWEVER, pturmel's Integration Toolkit adds this functionality, if you are allowed to install 3rd party modules. I daresay it is an absolute necessity on any production system.

> [@Automation Professionals' Integration Toolkit Module](https://forum.inductiveautomation.com/t/automation-professionals-integration-toolkit-module/74934):
>
> Automation Professionals is pleased to announce the immediately availability of a major upgrade to its free Simulation Aids Integration Toolkit module. The new feature justifying the "major upgrade" language is the implementation of eleven thirty-one new expression functions which use iteration to accomplish complex transforms of datasets and lists, to or from other datasets and lists, applying filtering, ordering, and computed new columns along the way. While there are certain operations that…

[https://www.automation-pros.com/toolkit/doc/](https://www.automation-pros.com/toolkit/doc/)

For a cleaner looking script you can do list comprehensions.

```python
def list_to_list_of_dicts(list_of_items, key_name):
	return [{key_name: item} for item in list_of_items]

```

---

<div class="post-metadata">

**Author:** ![Simon\_Hathout\_Willar](https://avatars.discourse-cdn.com/v4/letter/s/3da27b/32.png) [@Simon\_Hathout\_Willar](https://forum.inductiveautomation.com/u/Simon_Hathout_Willar)\
**Post date:** [February 19, 2025, 8:27pm UTC](https://forum.inductiveautomation.com/t/how-to-best-create-flex-repeater-parameter-dictionaries/102583/3 "2025-02-19T20:27:37Z")

</div>

Alright.

I will bring this up with my boss, as an option. We're just getting started with Ignition, and are looking to set ourselves up for success early on.

That post also seems to link to a bunch of other great resources about performance.

Thank you!
