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.
- 1 What is PowerApps Concat function?
- 2 When to use Concat() function in PowerApps?
- 3 What is PowerApps Concatenate function?
- 4 Examples
What is PowerApps Concat function?
Concatenates the result of a formula applied across all records in a table, resulting in a single string.
Concat( Table, Formula, separator)
- 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?
Concatenate function is used to add two or more text type data and put them into a similar text type data.
Concatenate( String1 [, 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
This table is the data that we will use in this tutorial.
PowerApps concat strings
If you want to concatenate two or more strings, you can use the Concatenate function.
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)
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
- Concatenate function as we used in the previous example
- Or the & operator
"Hello my name is" & User().FullName
- Or PowerApps concatenate using $ Strings which called string interpolation
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
PowerApps concat gallery items as a string
- If you want to concatenate all items in a column in a gallery
In this example I concatenate the first Name column from all items of the gallery
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.
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
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.
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.
- What are Microsoft Power Apps?
- How To Make PowerApps Work Offline?
- How PowerApps Patch Collection?
- PowerApps Patch Function Uses And Examples
- PowerApps Print Function, Forms, And Scrollable Galleries
- PowerApps Validation Examples On/before Submitting
- Share PowerApps With External Users / Guest Users
- Subscribe to Power Platform Geeks YouTube channel.
- Register to Saudi Arabia Power Platform User Group.
- Have a related question? Please ask it at deBUG.to Community.