It’s funny that there are two functions to perform concatenation of “stuff.” Some people get confused when thinking about using one or the other, but they serve different purposes. The “Concatenate Function” is used to aggregate a bunch of strings into only one. It’s super handy. The “Concat” function is used to do the same but with tables. You define a table, a formula, and “Concat” will return a string with the values formatted in a single string. Not as used as the previous one but equally powerful.
It follows a simple pattern.
Table: "Name:Manuel, type:First Name" "Name:Teixeira, type:Middle Name" "Name:Gomes, type: Last Name" Concat(Table, Name & ',') will return 'Manuel Teixeira Gomes'
One may think that this is not very useful, but think about your data structures that have multiple information and how it could be useful to prepare the data to use in:
- User facing elements. For example, in Azure’s AD, the person’s name is split into multiple fields. You can generate a string with them to use in a label in your app, for example.
- If you want to show more information to your user, for example, their permissions, you can use this function to generate a string with all the permissions’ descriptions so that the user knows what they can do. Or provide this to an administrator that can then pick from a list of additional permissions.
- Keep in mind that you may get delegable warnings when using this function. Please check my reference to see if the formula that you’re using is blocking the delegation.
- Use this function to transform data but keep the source data intact. Don’t use parsed information in your data source; otherwise, you’ll lose flexibility in displaying the information later.
- Keep the formula as simple as possible, especially the second parameter, to define what you want to do to the data.
- Don’t nest it. It’s quite easy to find cases to nest “concat functions” but avoid it. Split into multiple steps so that you can easily debug them later. The more complex the function, the more difficult it will be to keep things working without bugs.
- Please note that formulas may have localization-based differences. For example, you should write “aaa” with “separating each of the arguments, but if your regional settings are set to Portugal, you should use “;” instead.
Back to the Power Apps Function Reference
Photo by Ridham Nagralawala on Unsplash
2 thoughts on “Power Apps: Concat Function”
Thanks for the article. I have a quick question. How would you use the Concat function to transform data, live a value (from a choice column) to text?
For that you need to use the concatenate function. The concat is used especially for tables.
The concatenate is awesome because you can combine more or less all components that return a string. For your example, to get the selected value and concatenate it with a text input for example you can do:
Is this what you’re looking for?