Joining elements of an array into a string with delimiter with slicing
To mimic this python code:
viewPath = 'This/That/Other/Here'
parts = viewPath.split('/')
result = '/'.join(parts[:2])
Use this:
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().