Concat And Concatenate Functions In PowerApps

If you are asked to store data from a table into one column in SharePoint or SQL DB, how would you do that?


If you have a gallery or data table control in PowerApps which is bound to a collection:
Concat And Concatenate Functions In PowerApps 
Now, you want to store this data in one column in SharePoint or in SQL. You need to combine this data into one string like below, right? How to do this with one-line code in PowerApps.
You can do this with Concat function easily.
Syntax of concat function
Concat(Table, Formula)
Here a table can be anything like collection, Gallery.items, SP list data source, multiselected person and group field, or multi-selected choice field. And you need to create a concatenated string of value of column/item from these data sources --  then using Concat function is the only option.
In the formula, you can perform any of the string operations. In this example, we will be concatenating text from all rows and columns of a Gallery using concatenate inside Concat function.
Concat And Concatenate Functions In PowerApps
  1. Set(AllItemsString, Concat(GalleryRepeatingTable.AllItems, Concatenate(ItemSerialNumber.Text, ";", ItemName.Text, ";" ,ItemUnitCost.Text, ";", ItemQuantity.Text, ";", ItemTotalCost.Text,"|")))  
This is the gallery control with its item template controls inside, which I have used in the above example.
Concat And Concatenate Functions In PowerApps


We have already seen in the above example how concatenate can be used to combine/joint multiple string values into one.
Syntax of Concatenate function,
Concatenate(String1 [, String2, ...] )
It returns concatenated string.
If you want to combine two three field values and save it as the title of that record, you can use concatenate as shown below:
  1. Concatenate(TextBox1.Text, " ", TextBox2.Text, " ", TextBox3.Text)  
Hope this helps you to understand the difference between these two functions.