It looks like the only practical purpose for the concat() function is to convert an array to a string. You can’t use it to combine strings without inserting a comma into the new string and if you want to combine strings it’s easier to use "+". If I’m missing some other intended purpose please point it out.
As far as using it to convert an array to a string goes, there are a couple of problems. One is, it inserts a space which means you have to remove each added space if you want to convert the string back to an array using the split() function. The split function highlights the other problem with the concat() function. You can choose the delimiter with the split() function, but your stuck with the comma as a delimiter if you use the concat() function.
My suggestion is to implement the concat() function similar to the split() function instead of the unique() function. Meaning the user can choose the delimiter and, if they want, add a space to it. For example…
concat(myArray, "|") or if a space is desired
concat(myArray, ", ")
Thanksf a lot for this suggestion. I forwarded it to our change request database.
Thanks Ninox Team! I just realized that's what the new join() function does. 😎
join() does not convert a numeric array to text automatically the way
concat() does. Will this change in the future?
as far as I know the
join() function will stay as it is.