String:join with different join character last join

Is it possible to develop a second string:join function so that you can use a different join character for the last join.

The first example is standard join function. I want a function that functions like the yellow marked example.

@M_Ernster, what are user cases for this function? I mean: do you want to use it from the Architect or from an appliction?

I would probably just join all less than int:max({type,id,condition)} and then concat, just as you did.

Or is i’m certain my joinvalue isn’t in the data, as with the above axamples of numbers and a comma, i’d just join all and use a regexreplace on the resulting string.

Be aware that your 2 endresults in your above example would give different values if you would straight up copy-paste them into a quicksearch in your grids. So the usecase would certainly matter. If it is only for use in documents i’d probably let the XSLT parser handle it from a list.

We want to use it in both situations. In architect and in the application so we can use it in exportfields for activity/document generations. It resolves writing long codes.

The exclude last join is indeed possible in many ways.

It is a function we use a lot. And seems to me, very common practice. And it is not for use in quick searches.

@M_Ernster, I will create a SR for it for the platform team to look deeper into it.

1 Like

For this very VERY specific case, you could do something like:

messages:loadlist({products,messages:loadtranslated(code),id.islower(10)}).tostring()

(I don’t have ‘systemsinsales’ in my test application but the concept is the same)

Nice solution! Can I do this also in Architect?