How to Bind Power Apps Text Input Values to a Dropdown Control?

In this article, I will explain how to bind Power Apps text input values to a dropdown control. Additionally, I will show you how to bind multi-text values into a Power Apps dropdown control with some valuable examples.

Bind Power Apps Text Input Values to a Dropdown Control

In this section, I will show you how to bind text input values to a dropdown control in Power Apps with two different examples:

Bind Power Apps single-line text value to dropdown

I have a Power Apps Text input control, a Button control, and a Dropdown control.

When the user provides the values in a text input control and clicks on the button, those values will be added to a Power Apps dropdown control as shown below:

Bind text input values to dropdown control in Power Apps

Let me show you how to achieve this:

  • On the Power Apps screen, insert a Text input control as shown below:
How to bind text input values to a Power Apps dropdown control
  • Now, insert the Button control -> Set its OnSelect property to:
Collect(
    DepartmentCollection,
    Split(
        txt_Department.Text,
        Char(10)
    )
);
Reset(txt_Department);

Where,

  1. DepartmentCollection = Provide the collection name
  2. txt_Department = The text input control name
Bind single line text input values to dropdown items in Power Apps
  • On the Screen OnVisible property, provide the code as:
ClearCollect(DepartmentCollection, [])

Where,

  1. DepartmentCollection = Provide the collection name.
Format power bi ribbon chart
  • To add the values to the dropdown, insert a Dropdown control -> Set its Items property to:
DepartmentCollection.Value

Where,

  1. DepartmentCollection = Collection name
How to bind Power Apps text input values to a dropdown
  • Once your app is ready, savepublish, and preview it. When the user provides a value in the text-input control and clicks on a button control. Those values will be kept on adding to a dropdown control as shown below:
Power Apps dropdown items from a text input

As per the above image, we can see that the dropdown contains duplicate values.

After a user enters a text-input value and clicks on a button control, the dropdown should avoid adding any identical values to its existing items, as shown below:

How to bind Power Apps dropdown values from text input

So to remove those duplicate values and the dropdown should avoid taking similar values, then follow the below step:

  • Select the Power Apps dropdown control -> Set its Items property to:
Distinct(DepartmentCollection,Value)
Bind text input values to a Power Apps dropdown control
  • Save, Publish, and Preview the app. When the user provides the same value in the text-input control and clicks on a button control. The values will not be taken to a dropdown items as shown below:
How to bind text input values to dropdown control in Power Apps

This is how to bind a single line text input values to a dropdown in Power Apps.

Bind Power Apps multi-line text value to dropdown

Let us see how to add multiline text input values to a dropdown control in Power Apps.

Let’s say when the user provides the values in a text-input control (multi-text) and clicks on the button control, those values will be added to a Power Apps dropdown control as shown below:

Power bi treemap visual

Follow the below steps to achieve this:

  • On the Power Apps screen, insert a Text-input control. In the text-input control’s properties pane, change the mode to Multiline.
Power bi treemap multiple values
  • Insert a Button control -> Set its OnSelect property to:
UpdateContext(
    {
        Status: Split(
            txt_Status.Text,
            Char(10)
        )
    }
)

Where,

  1. Status = Variable name
  2. txt_Status = Text input control name
How to bind multiline text input to dropdown items in Power Apps
  • Insert a Dropdown control -> Set its Items property to:
Status

Where,

  1. Status = Variable name
Power bi treemap multiple values
  • Save, Publish, and Preview the app when the user provides a value in the text-input control and clicks on a button control. The values will be populated in a dropdown control as shown below:
Power BI Slicer

This is how to add multiline text input values to dropdown items in Power Apps.

Conclusion

I hope this article helped you to implement how to bind text input values into a Power Apps dropdown control with various scenarios.

Also, you may like the following tutorials:

>

Build a High-Performance Project Management Site in SharePoint Online

User registration Power Apps canvas app

DOWNLOAD USER REGISTRATION POWER APPS CANVAS APP

Download a fully functional Power Apps Canvas App (with Power Automate): User Registration App

Power Platform Tutorial FREE PDF Download

FREE Power Platform Tutorial PDF

Download 135 Pages FREE PDF on Microsoft Power Platform Tutorial. Learn Now…