You are currently viewing PowerApps Concat & Concatenate function examples

PowerApps Concat & Concatenate function examples

In this blog post, we will learn what is the PowerApps Concat and Concatenate function and we will learn the following

  • What are Concat and Concatenate function in PowerApps
  • When to use Concat() function in PowerApps
  • Difference between Concat and Concatenate function in PowerApps?
  • How PowerApps concat strings, PowerApps concat combopox, PowerApps concat table to string, PowerApps concat multiple values, PowerApps concat Collection, PowerApps concat gallery items.

What is PowerApps Concat function?

Usage
Concatenates the result of a formula applied across all records in a table, resulting in a single string.

Syntax
ConcatTableFormulaseparator)

  • Table to operate on.
  • Formula to apply across the records of the table.
  • Separator is a text value to be inserted between concatenated rows of the table.

When to use Concat() function in PowerApps?

When you want to store data from a table or collection into a single column in your SharePoint or SQL Database, then in this case you will use the Concat() function to perform this action. So we can said that the Concat function is used to add two or more collection items and put them together into a single text column.

What is PowerApps Concatenate function?

Usage
Concatenate function is used to add two or more text type data and put them into a similar text type data.

Syntax
ConcatenateString1 [, String2, …] )

  • String(s) – Mix of individual strings or a single-column table of strings.

Concat() accepts a table as input while Concatenate() expects a series of strings

Examples

This table is the data that we will use in this tutorial.

PowerApps Concat
PowerApps Concat data

PowerApps concat strings

If you want to concatenate two or more strings, you can use the Concatenate function.
Example:

I will concatenate the first name textbox and the last name textbox and concatenate ” ” space between the two string you can concatenate any separator, or you can’t add any separator if you don’t want but the text will be something like “HmzaMohamed” .

 Concatenate(TextInput1.Text, " ", TextInput2.Text)
conc2 | Power Platform Geeks

You can concatenate more than two texts just add the text inside your Concatenate formula

 Concatenate(TextInput1.Text, ";", TextInput2.Text,";", TextInput3.Text)

PowerApps can concatenate strings using

  1. Concatenate function as we used in the previous example
  2. Or the & operator
"Hello my name is" & User().FullName 
  1. Or PowerApps concatenate using $ Strings which called string interpolation
$"Hello {User().FullName}"

Place a dollar sign ($) in front of the quotation marks in the text string and use curly braces to denote the parts of it, you can use expressions – functions, formulas, or variables that may change.

Forexample here you can use the value of the textboxes

conc7 | Power Platform Geeks

PowerApps concat gallery items as a string

  • If you want to concatenate all items in a column in a gallery
Concat(Gallery1.AllItems,'First Name',"&")

In this example I concatenate the first Name column from all items of the gallery

PowerApps concat gallery items as a string
PowerApps concat gallery items as a string

PowerApps concat multiple values

In this example I will concatenate multiple values for all items in the gallery

 Concat(Gallery1.AllItems, Concatenate(Firstname.Text, " ", Lastname.Text),";")

Here I use the Concatenate function inside the Concat function to concatenate the strings ” Firstname and lastname in the gallery ” for each item and then concat the result of the Concatenate formula of all items.

conc4 | Power Platform Geeks

PowerApps concat table to string

In this example I will concatenate the First name and the last name from the employees data verse table

Concat(Employees,'First Name'&" "& 'Last Name',";")

I use “;” to separate between the records and ” ” to separate between the fields its optional

conc5 | Power Platform Geeks

PowerApps concat Collection

I this example we will concatenate the string of the first name and last name in the collection.

Concat(ColEmployees,'First Name'&" "& 'Last Name',";")

I use “;” to separate between the records

PowerApps concat combobox

I have a ComboBox1 that I would like to feed into a Label1. The ComboBox1 filled by [“Choice1”, “Choice2″, Choice3”].

Concat(ComboBox1.SelectedItems, yourCombocolumn, ", ")

yourCombocolumn: is the column you use inside your combo box.

conc6 | Power Platform Geeks

Conclusion

In this Power Apps post we know How to use Concat and Concatenate function to concatenate strings, combopox, table to string, multiple values, Collection, gallery items.

See Also

Join us
Need Help
  • Have a related question? Please ask it at deBUG.to Community.

Heba Kamal

Power Platform Consultant and Founder of Power Platform Geeks

Leave a Reply