# Integration Toolkit Solutions Wiki

**URL:** <https://forum.inductiveautomation.com/t/integration-toolkit-solutions-wiki/105080>\
**Category:** 3rd Party Modules\
**Tags:** scripting, ignition81\
**Created:** [April 14, 2025, 9:02pm UTC](https://forum.inductiveautomation.com/t/integration-toolkit-solutions-wiki/105080 "2025-04-14T21:02:36Z")\
**Posts on this page:** 1\
**Showing post:** 21

<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:** [June 23, 2025, 1:05am UTC](https://forum.inductiveautomation.com/t/integration-toolkit-solutions-wiki/105080/21 "2025-06-23T01:05:03Z")

</div>

## Accepting a single tagPath or list of tagPaths into `tags` (for backward compatibility)

I recently needed to add support for reading a list of tagPaths rather than just a single tagPath in a template, but needed to keep backwards compatibility, and compatibility for existing view template instances that don't have the new list param at all.

This expression essentially creates a single list of tagPaths by combining a single tagPath string and the new _list_ of tagPaths into one list and then subscribing to their values with `tags`.

_For this template, the tagPaths are actually paths to a UDT instance and I needed to read a specific tag from them, so in the expression I also append the relative path to the tag as well._

> **Expression**
>
> ```python
> tags(
> forEach(
> asPairs(
> if(
> {view.params.decorations.alarms.alarmSummaryAreaPath} != '',
> asList({view.params.decorations.alarms.alarmSummaryAreaPath}),
> asList()
> ), // if the param is '', present as an empty list, otherwise wrap it into a list
> coalesce(
> {view.params.decorations.alarms.alarmSummaryAreaPaths},
> asList()
> ) // if the param is Null, present as an empty list
> ),
> it() + '/Alarm Summary/Status'
> )
> )
> 
> ```

> **Example of input values**
>
> alarmSummaryAreaPath:  
> `"[tagProv]Path/To/Folder"`
> 
> alarmsummaryAreaPaths:
> 
> ```python
> [
> "[tagProv]Path/To/Other Folder",
> "[tagProv]Path/To/Other Other Folder"
> ]
> 
> ```
> 
> The expression will subscribe to these tags:
> 
> ```python
> [
> "[tagProv]Path/To/Folder/Alarm Summary/Status",
> "[tagProv]Path/To/Other Folder/Alarm Summary/Status",
> "[tagProv]Path/To/Other Other Folder/Alarm Summary/Status"
> ]
> 
> ```

---

_[View the full topic](https://forum.inductiveautomation.com/t/integration-toolkit-solutions-wiki/105080)._
