Every programming language has a variation of the “concatenate function,” but I like a lot the Power App’s implementation of it. Concatenation means creating a text string that has all the other elements in the function.
Usage
It follows a simple pattern.
Item to append
It's quite simple and powerful since you can append several pieces of text and arrive at a formatted text. For example:
Concatenate("Manuel"," T ", "Gomes")
# Returns: Manuel T Gomes
You can use the text property of a label to get the results.
Concatenate(Given Name, ", ", Family Name )
# Returns: Manuel Gomes
But what about if using a single-column table, what will you get?
# Employee being the list a list of the company's employees
Concatenate( Employee.GivenName, ", ", Employee.FamilyName )
# Returns an array as follows:
Manuel Gomes
Jack White
Steven Smith
Limitations
I could not find a limitation on the number of items that a concatenate can have, but I won’t recommend putting more than 20 elements in the function.
Recommendations:
Understand what you’re entering in the function so that you don’t have surprises. If you’re providing an array, you would expect a single string but the function will return another array.
Instead of “Concatenate” you can use “&”, but I don’t recommend it. It makes things shorter, but less clear. Also “&” is not a replacement for Concatenate when you’re using single column lists.
Be careful if you’re using variables. Be always aware of what they contain so that you don’t get undesired results.
Localization
Please note that formulas may have localization-based differences. For example, you should write “Concatenate(“hello”,” world”) “ with “,” separating each of the arguments, but if your regional settings are set to Portugal you should use “;” instead.
No comments yet
Be the first to share your thoughts on this article!