# 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:** 28

<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:** [May 15, 2026, 3:42pm UTC](https://forum.inductiveautomation.com/t/integration-toolkit-solutions-wiki/105080/28 "2026-05-15T15:42:40Z")

</div>

# Joining elements of an array into a string with delimiter with slicing

To mimic this python code:

```python
viewPath = 'This/That/Other/Here'
parts = viewPath.split('/')
result = '/'.join(parts[:2])

```

Use this:

```python
groupConcat(
	where(
		foreach(split({view.custom.currentPrimaryView}, '/'), it()[0]),
		idx() < 2
	),
'/')

```

@pturmel thanks for the hint, I've never used that native function before!

You can further simplify, BTW, since `where()` and `groupConcat()` can both take datasets. Eliminating the `forEach()`.

---

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