# Automation Professionals' Integration Toolkit Module

**URL:** <https://forum.inductiveautomation.com/t/automation-professionals-integration-toolkit-module/74934>\
**Category:** 3rd Party Modules\
**Tags:** perspective, ignition81, vision, scripting, ignition83\
**Created:** [June 13, 2023, 12:42am UTC](https://forum.inductiveautomation.com/t/automation-professionals-integration-toolkit-module/74934 "2023-06-13T00:42:35Z")\
**Posts on this page:** 20\
**Page:** 8

<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:** [August 5, 2024, 6:50pm UTC](https://forum.inductiveautomation.com/t/automation-professionals-integration-toolkit-module/74934/141 "2024-08-05T18:50:44Z")

</div>

Oh yeah, flatten in that case will not do what you need.

Since you are essentially trying to create a map with a variable amount of keys. You may need to use `asPairs()` in some form and build two lists with one being the key name and one being the key value.

I swear I have done this at least once and cannot find it.

---

<div class="post-metadata">

**Author:** ![dkhayes117](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/dkhayes117/32/68344_2.png) [@dkhayes117](https://forum.inductiveautomation.com/u/dkhayes117)\
**Post date:** [August 5, 2024, 6:51pm UTC](https://forum.inductiveautomation.com/t/automation-professionals-integration-toolkit-module/74934/142 "2024-08-05T18:51:31Z")

</div>

This works for the entire row background color, cell color is still MIA for now.

```python
forEach(
	{this.custom.data},
	asMap(
		'value',asMap(it()),
		'style',case(getDayofWeek(it()['scheduled']),
					2, asMap('color','white','backgroundColor','blue'),
					3, asMap('backgroundColor','orange'),
					4, asMap('color','white','backgroundColor','green'),
					5, asMap('backgroundColor','yellow'),
					6, asMap('color','white','backgroundColor','purple'),
					None
				)
	)
)

```

---

<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:** [August 5, 2024, 7:07pm UTC](https://forum.inductiveautomation.com/t/automation-professionals-integration-toolkit-module/74934/143 "2024-08-05T19:07:45Z")

</div>

Try this

edit: @Matthew.gaitan's is cleaner

```python
forEach(
	{this.custom.test},
	asMap(
		asPairs(
			forEach(it(), 
				asList(
					it()[0], 
					asMap(
						"value", it()[1], 
						"style", asMap()
					)
				)
			)
		)
	)
)

```

outputs

```python
[
  {
    "cover": {
      "value": "03-01D",
      "style": {}
    },
    "in_queue": {
      "value": 1722880635000,
      "style": {}
    },
    "serial": {
      "value": 4363915,
      "style": {}
    },
    "scheduled": {
      "value": 1723003200000,
      "style": {}
    },
    "style": {
      "value": "M9231351",
      "style": {}
    },
    "seats": {
      "value": "07-01A",
      "style": {}
    },
    "backs": {
      "value": "07-01A",
      "style": {}
    },
    "frame": {
      "value": "0M91-51",
      "style": {}
    }
  }
]

```

---

<div class="post-metadata">

**Author:** ![Matthew.gaitan](https://avatars.discourse-cdn.com/v4/letter/m/59ef9b/32.png) [@Matthew.gaitan](https://forum.inductiveautomation.com/u/Matthew.gaitan)\
**Post date:** [August 5, 2024, 7:08pm UTC](https://forum.inductiveautomation.com/t/automation-professionals-integration-toolkit-module/74934/144 "2024-08-05T19:08:53Z")

</div>

lol @ryan.white just beat me!

```python
forEach(
	{this.custom.data},
	asMap(
		forEach(
			it(),
			it()[0], asMap(
				'value', it()[1],
				"style", None
			)
		)
	)
)

```

---

<div class="post-metadata">

**Author:** ![dkhayes117](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/dkhayes117/32/68344_2.png) [@dkhayes117](https://forum.inductiveautomation.com/u/dkhayes117)\
**Post date:** [August 5, 2024, 7:12pm UTC](https://forum.inductiveautomation.com/t/automation-professionals-integration-toolkit-module/74934/145 "2024-08-05T19:12:18Z")

</div>

Looks like I had the second level `asMap` and `forEach` swapped. Thank you for the help @Matthew.gaitan @ryan.white

---

<div class="post-metadata">

**Author:** ![Matthew.gaitan](https://avatars.discourse-cdn.com/v4/letter/m/59ef9b/32.png) [@Matthew.gaitan](https://forum.inductiveautomation.com/u/Matthew.gaitan)\
**Post date:** [August 5, 2024, 7:18pm UTC](https://forum.inductiveautomation.com/t/automation-professionals-integration-toolkit-module/74934/146 "2024-08-05T19:18:09Z")

</div>

Happy to help! Kudos again to Phil for this awesome module that saves a lot of time 😃

---

<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:** [August 5, 2024, 9:58pm UTC](https://forum.inductiveautomation.com/t/automation-professionals-integration-toolkit-module/74934/147 "2024-08-05T21:58:02Z")

</div>

You can also do this:

```python
forEach(
	{this.custom.rawData},
	asMap( // Convert list of pairs back into a map (later keys replace earlier)
		asPairs(
			it(), // The map from the rawData gets converted to pairs.
			asMap( // Updates to merge get converted to pairs
				'someKey', "someValue',
				'anotherKey', 'anotherValue'
			)
		)
	)
)

```

`asMap()` has only two form: a single arg that is a list of lists of pairs, or an even number of args as key-value pairs.

---

<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:** [August 8, 2024, 7:40pm UTC](https://forum.inductiveautomation.com/t/automation-professionals-integration-toolkit-module/74934/148 "2024-08-08T19:40:24Z")

</div>

On ignition version 8.1.25, when attempting to use `tags` by itself in an expression gateway tag I get the error `Error_TypeConversion("class java.lang.Object: Invalid DataType for Dataset.")`

My gateway tag is configured as such:

> **Gateway Tag Configuration**
>
> ![TagsSetup1](https://us1.discourse-cdn.com/inductiveautomation/original/3X/0/f/0f8a57697db5b94721dcbb3e5926a3de0e01c7bf.png)

`ActiveCells` is another gateway expression tag configured to be a dataset with the following expression:

```python
unionAll(
		asMap("path", "str"),
		forEach(
			{[.]Cell_Count},
			asMap("path",
				if(
					it() = 0,
					"[.]../Cell_V",
					"[.]../Cell_V " + (it() + 1)
			)
		)
	)
)

```

that produces the following dataset:

```python
"#NAMES"
"path"
"#TYPES"
"str"
"#ROWS","3"
"[.]../Cell_V"
"[.]../Cell_V 2"
"[.]../Cell_V 3"

```

However, if I use `tags` within another expression such as

```python
mean(
	forEach(
		tags({[.]ActiveCells}),
		it()[1]
	)
)

```

I have no errors and the math matches the value provided by brute forcing the expression like `mean({[.]Cell_V},{[.]Cell_V 2},{[.]Cell_V 3})`

If I apply the expression `tags([tagProvider]path/to/ActiveCells)`, and apply it to a perspective property, it presents as a dataset type as expected.

---

<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:** [August 8, 2024, 7:59pm UTC](https://forum.inductiveautomation.com/t/automation-professionals-integration-toolkit-module/74934/149 "2024-08-08T19:59:03Z")

</div>

Many of my Toolkit functions are chameleons--their return type can vary based on the argument types given. Ignition expects functions to declare their return type, and chameleons must declare as `java.lang.Object`. (`tags()` returns a dataset when given a dataset, but a list of pairs when given a list.)

Perspective bindings are lax and just take whatever comes out of an expression. Expression tags check the function's declared return type against the tag's configured data type. For this situation, just wrap `tags()` inside a [toDataSet()](https://www.docs.inductiveautomation.com/docs/8.1/appendix/expression-functions/type-casting/toDataSet) type casting function.

---

<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:** [August 8, 2024, 8:02pm UTC](https://forum.inductiveautomation.com/t/automation-professionals-integration-toolkit-module/74934/150 "2024-08-08T20:02:05Z")

</div>

Unfortunately that results in the same error as well. I even deleted and rebuilt the tag in case it was something that had stuck with the tag.

> **Tag configuration**
>
> ![TagsSetup2](https://us1.discourse-cdn.com/inductiveautomation/original/3X/c/9/c9a7c0c2bbee2a7b648637aead1aa81ed149944a.png)

```python
toDataSet(
	tags(
		{[.]ActiveCells}
	)
)

```

Could this be something specific to 8.1.25? We are looking to update the version soon™

---

<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:** [August 8, 2024, 8:07pm UTC](https://forum.inductiveautomation.com/t/automation-professionals-integration-toolkit-module/74934/151 "2024-08-08T20:07:52Z")

</div>

Wait! I know what this is. I declare the value column coming back from `tags()` to also be `java.lang.Object`, as I do not know ahead of time what the tag value types are. Ignition has a whitelist of allowed column types for tags.

You will need to wrap `tags()` in a `unionAll()` that explicitly coerces the second column's values into a single numeric type.

---

<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:** [August 8, 2024, 8:11pm UTC](https://forum.inductiveautomation.com/t/automation-professionals-integration-toolkit-module/74934/152 "2024-08-08T20:11:41Z")

</div>

> [@pturmel](#):
>
> wrap `tags()` in a `unionAll()`

That did the trick! Thank you for your help.

---

<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:** [August 13, 2024, 8:44pm UTC](https://forum.inductiveautomation.com/t/automation-professionals-integration-toolkit-module/74934/153 "2024-08-13T20:44:38Z")

</div>

New ~~beta~~ _production_ release: [v2.0.18.242262035](https://www.automation-pros.com/ignition/Integration%20Toolkit-2.0.18.242262035-v81.modl)

Added a new expression function: [parsePath()](https://www.automation-pros.com/toolkit/doc/datasets.html#parsepath)

This function accepts a tag path or qualified path in string format and produces a dataset with the various qualified components broken out. If necessary, additional strings may be supplied, and the result dataset will have a row for each.

(I've been frustrated with the need for scripts to produce proper historical paths from simple tag paths.)

I'm using this with a client right now, so will likely be declared production grade soon.

---

<div class="post-metadata">

**Author:** ![lrose](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/lrose/32/62724_2.png) [@lrose](https://forum.inductiveautomation.com/u/lrose)\
**Post date:** [August 15, 2024, 2:29pm UTC](https://forum.inductiveautomation.com/t/automation-professionals-integration-toolkit-module/74934/154 "2024-08-15T14:29:16Z")

</div>

Using V2.0.16(b241352008)

Getting the following NPE:

> **Null Pointer Exception**
>
> ```python
> Stop Occurances.Root Container.Packaging Group.packagingMinsTable.summedData
> at com.inductiveautomation.factorypmi.application.binding.ExpressionPropertyAdapter.runExpression(ExpressionPropertyAdapter.java:92)
> at com.inductiveautomation.factorypmi.application.binding.ExpressionPropertyAdapter$1.run(ExpressionPropertyAdapter.java:59)
> at com.inductiveautomation.ignition.client.util.EDTUtil$ProcessQueue.run(EDTUtil.java:126)
> at java.desktop/java.awt.event.InvocationEvent.dispatch(Unknown Source)
> at java.desktop/java.awt.EventQueue.dispatchEventImpl(Unknown Source)
> at java.desktop/java.awt.EventQueue$4.run(Unknown Source)
> at java.desktop/java.awt.EventQueue$4.run(Unknown Source)
> at java.base/java.security.AccessController.doPrivileged(Unknown Source)
> at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
> at java.desktop/java.awt.EventQueue.dispatchEvent(Unknown Source)
> at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
> at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
> at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
> at java.desktop/java.awt.EventDispatchThread.pumpEvents(Unknown Source)
> at java.desktop/java.awt.EventDispatchThread.pumpEvents(Unknown Source)
> at java.desktop/java.awt.EventDispatchThread.run(Unknown Source)
> Caused by: java.lang.NullPointerException: Cannot invoke "Object.getClass()" because "values[0]" is null
> at com.automation_pros.simaids.expressions.AsMap.execute(AsMap.java:58)
> at com.inductiveautomation.ignition.client.expressions.ClientDynamicDispatchFunction.execute(ClientDynamicDispatchFunction.java:43)
> at com.inductiveautomation.ignition.client.expressions.ClientDynamicDispatchFunction.execute(ClientDynamicDispatchFunction.java:43)
> at com.inductiveautomation.ignition.common.expressions.FunctionExpression.execute(FunctionExpression.java:69)
> at com.inductiveautomation.ignition.common.expressions.SubscriptExpression.execute(SubscriptExpression.java:50)
> at com.inductiveautomation.ignition.common.expressions.functions.BaseFunction.executeAll(BaseFunction.java:64)
> at com.automation_pros.simaids.expressions.SimpleIterator.execute(SimpleIterator.java:177)
> at com.inductiveautomation.ignition.client.expressions.ClientDynamicDispatchFunction.execute(ClientDynamicDispatchFunction.java:43)
> at com.inductiveautomation.ignition.client.expressions.ClientDynamicDispatchFunction.execute(ClientDynamicDispatchFunction.java:43)
> at com.inductiveautomation.ignition.common.expressions.FunctionExpression.execute(FunctionExpression.java:69)
> at com.inductiveautomation.factorypmi.application.binding.ExpressionPropertyAdapter.runExpression(ExpressionPropertyAdapter.java:83)
> ... 15 common frames omitted
> 
> ```

> **Expression producing exception**
>
> ```python
> selectStar(
> {Root Container.Packaging Group.packagingMinsTable.pivotedData},
> asMap(	
> forEach(
> groupBy(
> {Root Container.Packaging Group.packagingMinsTable.last8HistoricalData},
> it()['path']
> ),
> asList(
> it()[0],
> round(sum(it()[1],'value')/60.0,1)
> )
> )
> )[it()['Occurrence']],
> 'Last 8',
> 'F',
> asMap(
> forEach(
> groupBy(
> {Root Container.Packaging Group.packagingMinsTable.historicalData},
> it()['path']
> ),
> asList(
> it()[0],
> round(sum(it()[1],'value') / 60.0,1)
> )
> )
> )[it()['Occurrence']],
> 'Last 24',
> 'F'
> )
> 
> ```

> **Sample pivotedData**
>
> ```python
> "#NAMES"
> "Occurrence","_7A","_8A","_9A","_10A","_11A","_12P","_1P","_2P","_3P","_4P","_5P","_6P","_7P","_8P","_9P","_10P","_11P","_12A","_1A","_2A","_3A","_4A","_5A","_6A"
> "#TYPES"
> "str","F","F","F","F","F","F","F","F","F","F","F","F","F","F","F","F","F","F","F","F","F","F","F","F"
> "#ROWS","5"
> "productlevel_at_sp","60.0","60.0","60.0","60.0","60.0","47.2","60.0","60.0","60.0","60.0","60.0","60.0","60.0","60.0","60.0","60.0","60.0","60.0","60.0","60.0","60.0","60.0","60.0","60.0"
> "cap_supply","60.0","60.0","60.0","60.0","60.0","47.2","60.0","60.0","60.0","60.0","60.0","60.0","60.0","60.0","60.0","60.0","60.0","60.0","60.0","60.0","60.0","60.0","60.0","60.0"
> "downstream_stop_request","60.0","60.0","60.0","60.0","60.0","47.2","60.0","60.0","60.0","60.0","60.0","60.0","60.0","60.0","60.0","60.0","60.0","60.0","60.0","60.0","60.0","60.0","60.0","60.0"
> "empty_bottles_present","0.0","0.0","0.0","0.0","0.0","0.0","0.0","0.0","0.0","0.0","0.0","0.0","0.0","0.0","0.0","0.0","0.0","0.0","0.0","0.0","0.0","0.0","0.0","0.0"
> "empty_bottles_primied","60.0","60.0","60.0","60.0","60.0","47.2","60.0","60.0","60.0","60.0","60.0","60.0","60.0","60.0","60.0","60.0","60.0","60.0","60.0","60.0","60.0","60.0","60.0","60.0"
> 
> ```

> **Sample historicalData**
>
> ```python
> "#NAMES"
> "path","value","quality","timestamp"
> "#TYPES"
> "str","L","I","date"
> "#ROWS","120"
> "Stacker","0","192","2024-08-14 11:00:00.000"
> "Dynac","564","192","2024-08-14 11:00:00.000"
> "Labeler","561","192","2024-08-14 11:00:00.000"
> "Laner","121","192","2024-08-14 11:00:00.000"
> "Caser","416","192","2024-08-14 11:00:00.000"
> "Stacker","25","192","2024-08-14 12:00:00.000"
> "Dynac","0","192","2024-08-14 12:00:00.000"
> "Labeler","0","192","2024-08-14 12:00:00.000"
> "Laner","0","192","2024-08-14 12:00:00.000"
> "Caser","0","192","2024-08-14 12:00:00.000"
> "Stacker","0","192","2024-08-14 13:00:00.000"
> "Dynac","0","192","2024-08-14 13:00:00.000"
> "Labeler","371","192","2024-08-14 13:00:00.000"
> "Laner","0","192","2024-08-14 13:00:00.000"
> "Caser","0","192","2024-08-14 13:00:00.000"
> "Stacker","0","192","2024-08-14 14:00:00.000"
> "Dynac","1087","192","2024-08-14 14:00:00.000"
> "Labeler","270","192","2024-08-14 14:00:00.000"
> "Laner","86","192","2024-08-14 14:00:00.000"
> "Caser","1919","192","2024-08-14 14:00:00.000"
> "Stacker","160","192","2024-08-14 15:00:00.000"
> "Dynac","143","192","2024-08-14 15:00:00.000"
> "Labeler","948","192","2024-08-14 15:00:00.000"
> "Laner","0","192","2024-08-14 15:00:00.000"
> "Caser","1049","192","2024-08-14 15:00:00.000"
> "Stacker","1118","192","2024-08-14 16:00:00.000"
> "Dynac","0","192","2024-08-14 16:00:00.000"
> "Labeler","4","192","2024-08-14 16:00:00.000"
> "Laner","212","192","2024-08-14 16:00:00.000"
> "Caser","1809","192","2024-08-14 16:00:00.000"
> "Stacker","135","192","2024-08-14 17:00:00.000"
> "Dynac","0","192","2024-08-14 17:00:00.000"
> "Labeler","0","192","2024-08-14 17:00:00.000"
> "Laner","3391","192","2024-08-14 17:00:00.000"
> "Caser","0","192","2024-08-14 17:00:00.000"
> "Stacker","3168","192","2024-08-14 18:00:00.000"
> "Dynac","0","192","2024-08-14 18:00:00.000"
> "Labeler","0","192","2024-08-14 18:00:00.000"
> "Laner","0","192","2024-08-14 18:00:00.000"
> "Caser","0","192","2024-08-14 18:00:00.000"
> "Stacker","0","192","2024-08-14 19:00:00.000"
> "Dynac","0","192","2024-08-14 19:00:00.000"
> "Labeler","0","192","2024-08-14 19:00:00.000"
> "Laner","0","192","2024-08-14 19:00:00.000"
> "Caser","0","192","2024-08-14 19:00:00.000"
> "Stacker","673","192","2024-08-14 20:00:00.000"
> "Dynac","0","192","2024-08-14 20:00:00.000"
> "Labeler","0","192","2024-08-14 20:00:00.000"
> "Laner","0","192","2024-08-14 20:00:00.000"
> "Caser","9","192","2024-08-14 20:00:00.000"
> "Stacker","1194","192","2024-08-14 21:00:00.000"
> "Dynac","208","192","2024-08-14 21:00:00.000"
> "Labeler","587","192","2024-08-14 21:00:00.000"
> "Laner","0","192","2024-08-14 21:00:00.000"
> "Caser","985","192","2024-08-14 21:00:00.000"
> "Stacker","0","192","2024-08-14 22:00:00.000"
> "Dynac","1474","192","2024-08-14 22:00:00.000"
> "Labeler","108","192","2024-08-14 22:00:00.000"
> "Laner","0","192","2024-08-14 22:00:00.000"
> "Caser","1568","192","2024-08-14 22:00:00.000"
> "Stacker","0","192","2024-08-14 23:00:00.000"
> "Dynac","0","192","2024-08-14 23:00:00.000"
> "Labeler","1588","192","2024-08-14 23:00:00.000"
> "Laner","0","192","2024-08-14 23:00:00.000"
> "Caser","1710","192","2024-08-14 23:00:00.000"
> "Stacker","0","192","2024-08-15 00:00:00.000"
> "Dynac","2651","192","2024-08-15 00:00:00.000"
> "Labeler","1467","192","2024-08-15 00:00:00.000"
> "Laner","0","192","2024-08-15 00:00:00.000"
> "Caser","0","192","2024-08-15 00:00:00.000"
> "Stacker","0","192","2024-08-15 01:00:00.000"
> "Dynac","63","192","2024-08-15 01:00:00.000"
> "Labeler","374","192","2024-08-15 01:00:00.000"
> "Laner","0","192","2024-08-15 01:00:00.000"
> "Caser","130","192","2024-08-15 01:00:00.000"
> "Stacker","0","192","2024-08-15 02:00:00.000"
> "Dynac","110","192","2024-08-15 02:00:00.000"
> "Labeler","0","192","2024-08-15 02:00:00.000"
> "Laner","0","192","2024-08-15 02:00:00.000"
> "Caser","276","192","2024-08-15 02:00:00.000"
> "Stacker","0","192","2024-08-15 03:00:00.000"
> "Dynac","461","192","2024-08-15 03:00:00.000"
> "Labeler","0","192","2024-08-15 03:00:00.000"
> "Laner","0","192","2024-08-15 03:00:00.000"
> "Caser","777","192","2024-08-15 03:00:00.000"
> "Stacker","19","192","2024-08-15 04:00:00.000"
> "Dynac","768","192","2024-08-15 04:00:00.000"
> "Labeler","615","192","2024-08-15 04:00:00.000"
> "Laner","0","192","2024-08-15 04:00:00.000"
> "Caser","672","192","2024-08-15 04:00:00.000"
> "Stacker","121","192","2024-08-15 05:00:00.000"
> "Dynac","103","192","2024-08-15 05:00:00.000"
> "Labeler","54","192","2024-08-15 05:00:00.000"
> "Laner","0","192","2024-08-15 05:00:00.000"
> "Caser","238","192","2024-08-15 05:00:00.000"
> "Stacker","239","192","2024-08-15 06:00:00.000"
> "Dynac","813","192","2024-08-15 06:00:00.000"
> "Labeler","230","192","2024-08-15 06:00:00.000"
> "Laner","0","192","2024-08-15 06:00:00.000"
> "Caser","362","192","2024-08-15 06:00:00.000"
> "Stacker","550","192","2024-08-15 07:00:00.000"
> "Dynac","0","192","2024-08-15 07:00:00.000"
> "Labeler","0","192","2024-08-15 07:00:00.000"
> "Laner","34","192","2024-08-15 07:00:00.000"
> "Caser","773","192","2024-08-15 07:00:00.000"
> "Stacker","0","192","2024-08-15 08:00:00.000"
> "Dynac","598","192","2024-08-15 08:00:00.000"
> "Labeler","214","192","2024-08-15 08:00:00.000"
> "Laner","37","200","2024-08-15 08:00:00.000"
> "Caser","302","192","2024-08-15 08:00:00.000"
> "Stacker","553","200","2024-08-15 09:00:00.000"
> "Dynac","0","200","2024-08-15 09:00:00.000"
> "Labeler","77","200","2024-08-15 09:00:00.000"
> "Laner","0","200","2024-08-15 09:00:00.000"
> "Caser","1306","200","2024-08-15 09:00:00.000"
> "Stacker","0","200","2024-08-15 10:00:00.000"
> "Dynac","0","200","2024-08-15 10:00:00.000"
> "Labeler","0","200","2024-08-15 10:00:00.000"
> "Laner","0","200","2024-08-15 10:00:00.000"
> "Caser","0","200","2024-08-15 10:00:00.000"
> 
> ```

> **Sample last8HistoricalData**
>
> ```python
> "#NAMES"
> "path","value","quality","timestamp"
> "#TYPES"
> "str","L","I","date"
> "#ROWS","40"
> "Stacker","0","192","2024-08-15 03:00:00.000"
> "Dynac","461","192","2024-08-15 03:00:00.000"
> "Labeler","0","192","2024-08-15 03:00:00.000"
> "Laner","0","192","2024-08-15 03:00:00.000"
> "Caser","777","192","2024-08-15 03:00:00.000"
> "Stacker","19","192","2024-08-15 04:00:00.000"
> "Dynac","768","192","2024-08-15 04:00:00.000"
> "Labeler","615","192","2024-08-15 04:00:00.000"
> "Laner","0","192","2024-08-15 04:00:00.000"
> "Caser","672","192","2024-08-15 04:00:00.000"
> "Stacker","121","192","2024-08-15 05:00:00.000"
> "Dynac","103","192","2024-08-15 05:00:00.000"
> "Labeler","54","192","2024-08-15 05:00:00.000"
> "Laner","0","192","2024-08-15 05:00:00.000"
> "Caser","238","192","2024-08-15 05:00:00.000"
> "Stacker","239","192","2024-08-15 06:00:00.000"
> "Dynac","813","192","2024-08-15 06:00:00.000"
> "Labeler","230","192","2024-08-15 06:00:00.000"
> "Laner","0","192","2024-08-15 06:00:00.000"
> "Caser","362","192","2024-08-15 06:00:00.000"
> "Stacker","550","192","2024-08-15 07:00:00.000"
> "Dynac","0","192","2024-08-15 07:00:00.000"
> "Labeler","0","192","2024-08-15 07:00:00.000"
> "Laner","34","192","2024-08-15 07:00:00.000"
> "Caser","773","192","2024-08-15 07:00:00.000"
> "Stacker","0","192","2024-08-15 08:00:00.000"
> "Dynac","598","192","2024-08-15 08:00:00.000"
> "Labeler","214","192","2024-08-15 08:00:00.000"
> "Laner","37","200","2024-08-15 08:00:00.000"
> "Caser","302","192","2024-08-15 08:00:00.000"
> "Stacker","553","200","2024-08-15 09:00:00.000"
> "Dynac","0","192","2024-08-15 09:00:00.000"
> "Labeler","77","192","2024-08-15 09:00:00.000"
> "Laner","0","200","2024-08-15 09:00:00.000"
> "Caser","1306","192","2024-08-15 09:00:00.000"
> "Stacker","0","200","2024-08-15 10:00:00.000"
> "Dynac","251","192","2024-08-15 10:00:00.000"
> "Labeler","2268","192","2024-08-15 10:00:00.000"
> "Laner","0","200","2024-08-15 10:00:00.000"
> "Caser","563","192","2024-08-15 10:00:00.000"
> 
> ```

I have corrected why values[0] was null, but thought you would like to have the report either way.

---

<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:** [August 15, 2024, 3:19pm UTC](https://forum.inductiveautomation.com/t/automation-professionals-integration-toolkit-module/74934/155 "2024-08-15T15:19:26Z")

</div>

> [@lrose](#):
>
> would like to have the report

Indeed. Simple fix--will be in next release.

---

<div class="post-metadata">

**Author:** ![nminchin](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/nminchin/32/6911_2.png) [@nminchin](https://forum.inductiveautomation.com/u/nminchin)\
**Post date:** [August 16, 2024, 3:58am UTC](https://forum.inductiveautomation.com/t/automation-professionals-integration-toolkit-module/74934/156 "2024-08-16T03:58:44Z")

</div>

Hey Phil, it would be really good to get some more examples into your docs for your toolkit functions. I'm looking at you, [https://www.automation-pros.com/toolkit/doc/iteration.html#iterables](https://www.automation-pros.com/toolkit/doc/iteration.html#iterables) 😁

---

<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:** [August 16, 2024, 11:16am UTC](https://forum.inductiveautomation.com/t/automation-professionals-integration-toolkit-module/74934/157 "2024-08-16T11:16:13Z")

</div>

> [@nminchin](#):
>
> more examples

Yeah, I've thought about posting some recipes for common expressions. I'll tackle this in my _copious_ free time.

---

<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:** [August 16, 2024, 1:04pm UTC](https://forum.inductiveautomation.com/t/automation-professionals-integration-toolkit-module/74934/158 "2024-08-16T13:04:50Z")

</div>

Meanwhile, I'm declaring the [above beta](https://forum.inductiveautomation.com/t/automation-professionals-integration-toolkit-module/74934/153) a production release. It has survived a week of (ab)use at the client mentioned.

---

<div class="post-metadata">

**Author:** ![michael.flagler](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/michael.flagler/32/26272_2.png) [@michael.flagler](https://forum.inductiveautomation.com/u/michael.flagler)\
**Post date:** [August 16, 2024, 1:39pm UTC](https://forum.inductiveautomation.com/t/automation-professionals-integration-toolkit-module/74934/159 "2024-08-16T13:39:50Z")

</div>

Yeah, I keep seeing lots of good feedback about the module, but haven't had the time to dig into its uses, but more examples would help me out too. Maybe I don't know what I'm missing out on! To be fair, @pturmel has put a lot of work into this module that anyone can download and use for free, so the amount of documentation already is exceedingly better than most Exchange resources.

---

<div class="post-metadata">

**Author:** ![lrose](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/lrose/32/62724_2.png) [@lrose](https://forum.inductiveautomation.com/u/lrose)\
**Post date:** [August 16, 2024, 2:34pm UTC](https://forum.inductiveautomation.com/t/automation-professionals-integration-toolkit-module/74934/160 "2024-08-16T14:34:54Z")

</div>

> [@michael.flagler](#):
>
> Maybe I don't know what I'm missing out on!

The ability to iterate through data in an expression is a gamechanger. The performance gains alone are worth it. Things that can only be done with a script transform in perspective are now completely achievable in a pure expression binding.

[Previous page](https://forum.inductiveautomation.com/t/automation-professionals-integration-toolkit-module/74934.md?page=7)

[Next page](https://forum.inductiveautomation.com/t/automation-professionals-integration-toolkit-module/74934.md?page=9)
