0

A new concat() function

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, ", ")

6replies Oldest first
  • Oldest first
  • Newest first
  • Active threads
  • Popular
    • Birger H
    • Birger_H
    • 3 yrs ago
    • Reported - view

    Thanksf a lot for this suggestion. I forwarded it to our change request database.

    Birger

    Like
    • Sean
    • Sean
    • 2 yrs ago
    • Reported - view

    Thanks Ninox Team! I just realized that's what the new join() function does. 😎

    Like
    • Sean
    • Sean
    • 2 yrs ago
    • Reported - view

    Interestingly, join() does not convert a numeric array to text automatically the way concat() does. Will this change in the future?

    Like
    • Support
    • Support
    • 2 yrs ago
    • Reported - view

    Hi Sean, 

    as far as I know the join() function will stay as it is.

    Best, Jörg

    Like
    • jel888
    • jel888
    • 1 yr ago
    • Reported - view

    Hello, I know this is an older post, but if I need to create a numeric field that shows a concatenation of the ID two fields, which formula would I use, I assume concat and if so, how do I write the array?  (Eg.  in my project table I have an automated ID field and in my task table I have an automated ID field, but I'd like a field that shows the "project ID.task ID", as 1.12 or 2.4 etc.

    Like
  • You could concatenate like this in a formula field: projectID+"."+taskID

    Like
Like Follow
  • 1 yr agoLast active
  • 6Replies
  • 3013Views