web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Bind Power Apps text i...
Power Apps
Unanswered

Bind Power Apps text input values in a dropdown control

(0) ShareShare
ReportReport
Posted on by 67

Hi Members,

 

I have a requirement in Power Apps where I want to populate or bind the text input values in a Dropdown control.

 

Scenario:

I have a Power Apps Text input control [Single line], Dropdown control, and Button Control. I will enter one value inside the text input box and then click the Button.

 

For example, if the user provides Completed in the text input control and clicks on the button 5 times, the dropdown will have the 5 values of Completed.

Drp error 1.png

 

 

 

 

 

 

 

 

 

 

 

 

 

But in my case, the text values are binding in the dropdown control but if I click on the button control again and again, the dropdown values do not increase.

 

For example, If I click on the button control 4 times, the dropdown value is only 1 item Completed. But I need the four values of completed.

 

Drp error.jpg

 

 

 

 

 

 

 

 

 

 

In the button control's OnSelect property, I have put the below code:

 

UpdateContext({Status3:Split(txt_Status_1.Text, Char(10))})

 

Drp error 2.png

 

 

Can anyone please suggest how I can resolve this? Thanks in advance!

 

Categories:
I have the same question (0)
  • Prabhakar_S Profile Picture
    735 Moderator on at

    Hi @Hemashree ,

     

    It looks like you are trying to split the text entered in the 'txt_Status_1' input control by a newline character (Char(10)) and then update a context variable ('Status3') with the result. However, if you want to accumulate the values in the dropdown each time you click the button, you should use a different approach.

     

    The 'UpdateContext' function sets a context variable to a specified value, and it doesn't accumulate the values. Instead, you can use a collection to store the values. 

     

    1. Create a collection to store the values. In the 'OnSelect' property of the Add button insert this formula:

     

    Collect(StatusCollection, Split(txt_Status_1.Text, Char(10)))

     

    Here, 'StatusCollection' is the name of the collection. You should create this collection in the 'OnStart' property of your app or somewhere else appropriate. Make sure it's created before you use it.

     

    2. Bind the dropdown control to the collection, In the 'Items' property of the dropdown control insert this collection name,

     

    StatusCollection

     

    This will make the dropdown show the values from the collection and add the new values to the existing ones in the collection.

     

    Now, each time you click the button, it will add new values to the collection, and the dropdown will show all the accumulated values.

     

    Remember to initialize the 'StatusCollection' collection appropriately, for example, in the 'OnStart' property of your app:

     

    ClearCollect(StatusCollection, [])

     

    This initializes an empty collection at the start of your app.

     

    Thanks!!!

     

    Please consider marking my response as the accepted solution if it successfully resolves your concern. If you found the information beneficial in other aspects, kindly express your appreciation by giving it a thumbs-up.

  • HM-22080408-0 Profile Picture
    67 on at

    Thank you @Prabhakar_S 

    This worked for me:

  • Prabhakar_S Profile Picture
    735 Moderator on at

    Hi @Hemashree ,

     

    That's great. If the issue is resolved, I would request you Accept the solution and close this ticket. So that it will be helpful for others who encounter the same kind of issue.

     

    Thanks!!!

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 551

#2
WarrenBelz Profile Picture

WarrenBelz 430 Most Valuable Professional

#3
Valantis Profile Picture

Valantis 298

Last 30 days Overall leaderboard