Power Apps is a powerful platform that allows you to build apps quickly without deep coding knowledge. One of the most commonly used functions in Power Apps is Concat(), which helps you combine multiple values from a table into a single text string. In this article, we’ll explore Concat() in detail with examples.

What is Concat() in Power Apps?

The Concat() function in Power Apps is used to:

Syntax:

Concat(Table, Formula, Separator)

Step 1: Create a Sample Table

Before using Concat(), we need a data source. You can create a collection in Power Apps for testing.

  1. Open your Power Apps Studio.

  2. Create a blank canvas app.

  3. Go to the OnStart property of the App and enter the following formula:

ClearCollect(
    colFruits,
    {Name: "Apple"},
    {Name: "Banana"},
    {Name: "Mango"}
);

ClearCollect(
    colCars,
    {Name: "BMW"},
    {Name: "Audi"},
    {Name: "Tesla"}
);

ClearCollect(
    colAnimals,
    {Name: "Dog"},
    {Name: "Cat"},
    {Name: "Elephant"}
);
  1. Run the app to initialize the collection by clicking App → OnStart → Run OnStart.

    222

Step 2: Create App Screen with Label, and Buttons

Add Controls to the Screen

  1. Create Screen - Concat_Function_Screen

  2. Insert the following controls from the Insert menu:

    • Label → This will display the concatenated results.

      • Set its Name to Label2_9.

      • Set Text property to "Please Select a Category" ( initially).

    • Buttons → For different categories. Add four buttons:

      1. Button2 → Text: Get Fruits

      2. Button2_1 → Text: Get Cars

      3. Button2_2 → Text: Get Animals

      4. Button2_3 → Text: Clear

        333

Step 3: Update the Label

Switch(
    varSelected,
    "Fruit", Concat(colFruits, Name, ", "),
    "Car", Concat(colCars, Name, ", "),
    "Animal", Concat(colAnimals, Name, ", "),
    "None", "Please select a category",
    "Please select a category"
)

Explanation:

Step 4: Set varSelected on Every Button

Update Button OnSelect Properties

  1. Get Fruits Button

Set(varSelected, "Fruit")
  1. Get Cars Button

Set(varSelected, "Car")
  1. Get Animals Button

Set(varSelected, "Animal")
  1. Clear Button

Set(varSelected, "None")
555

How It Works

Step 5: Test the App

  1. Click the Play button (▶️) in Power Apps Studio to run the app.

  2. Test Each Button

    1. Click Get Fruits

      • The label should show:

      Apple, Banana, Orange
    2. Click Get Cars

      • The label should update to:

      BMW, Tesla, Audi
    3. Click Get Animals

      • The label should update to:

      Dog, Cat, Elephant
    4. Click Clear

      • The label should show the default message:

      Please select a category
      666

Conclusion

In this article, we explored how to use the Concat() function in Power Apps to combine multiple values from a collection into a single text string. By combining Concat() with the Switch() function and a variable (varSelected), we created a dynamic app where only the selected category — Fruits, Cars, or Animals — is displayed in a label.