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 / User-Inputs New Choice...
Power Apps
Unanswered

User-Inputs New Choice for a Dropdown through a pop-up text input - how do I make that choice autoselected in the dropdown?

(0) ShareShare
ReportReport
Posted on by 18

Good Morning, 

 

I have a form with several dropdowns. For these dropdowns, I have a choice "Unlisted - New". When the user selects this choice, it causes a pop-up to appear for them to input a new choice. This feature does work, that choice is added to the dropdown. But as of now, it requires the user to hit the dropdown again to select that addition. I want their input to automatically populate as the choice in the dropdown. As of now, I hit Submit under the popup for the new entry and the dropdown resets back to blank and I have to hit the dropdown again to find the new selection. 

 

This is the current On Select formula I have for the text input submit button 

Patch(SUP_Profile_Dropdowns, Defaults(SUP_Profile_Dropdowns), {cr371_strategycategory:TextInput2_4.Text}); Refresh(SUP_Profile_Dropdowns); Set(ConfirmPopUpSC,false);

Categories:
I have the same question (0)
  • Rajkumar_M Profile Picture
    3,743 Moderator on at

    Hi

    Try this 

    Use variable to store the selected choice in the dropdown

    Set the Items property of the dropdown control to SelectedChoice.


    Patch(SUP_Profile_Dropdowns, Defaults(SUP_Profile_Dropdowns), {cr371_strategycategory: TextInput2_4.Text});
    Set(SelectedChoice, TextInput2_4.Text);
    Refresh(SUP_Profile_Dropdowns);
    Set(ConfirmPopUpSC, false);

    Or

    Using the Collect function to add the new choice entered by the user to a collection called DropdownChoices.

    Patch(SUP_Profile_Dropdowns, Defaults(SUP_Profile_Dropdowns), {cr371_strategycategory:TextInput2_4.Text}); Collect(DropdownChoices, {Value: TextInput2_4.Text}); Set(ConfirmPopUpSC, false)

    Set the Items property of the dropdown control to DropdownChoices.

    Thanks!

    If my response has been helpful in resolving your issue, I kindly request that you consider clicking "Accept as solution" and "giving it a thumbs up" as a token of appreciation.

  • MollyWeasley89 Profile Picture
    18 on at

    Hello Rajkumar_404, 

     

    Thanks for responding. The first option did not work for me. It showed an error. My version of PowerApps does not offer a SelectedChoice option, I think it is the problem. 

     

    I tried the second option and no errors are in the formula, however I lost all values in the dropdown. I want to confirm I am putting the formulas in the right place. 

    In the Submit Button (On Select) for the Text Input popup that will feed into the dropdown I have

    Patch(SUP_Profile_Dropdowns, Defaults(SUP_Profile_Dropdowns), {cr371_strategycategory:TextInput2_4.Text}); Collect(DropdownChoices, {Value: TextInput2_4.Text}); Set(ConfirmPopUpSC, false)

    For the Items property of the Dropdown, I put "DropdownChoices"

  • Rajkumar_M Profile Picture
    3,743 Moderator on at

    SelectedChoice is not a function its Variable name.

  • MollyWeasley89 Profile Picture
    18 on at

    Rajkumar, thank you. I am still getting an error. I pasted the SelectedChoice option you have (the first one) into the "Items" property of the dropdown.

    Patch(SUP_Profile_Dropdowns, Defaults(SUP_Profile_Dropdowns), {cr371_strategycategory: TextInput2_4.Text});
    Set(SelectedChoice, TextInput2_4.Text);

    The error it gives me is expected operator (it says it expects a +,*, or &). I cannot figure out what the issue is. 

  • Rajkumar_M Profile Picture
    3,743 Moderator on at
    If you want store temporarily use collection
     
    In On Select button property put this : Collect(SelectedChoice, TextInput2_4.Text);
                                                    Set(ConfirmPopUpSC,false);
     
    Dropdown item property: SelectedChoice
     
    Note : Collection is temporarily database, if you exit the app all data are reset
     
    If you want store permanent use SharePoint List or Excel as a database and connect to Powerapps
     
    In On Select button property put this :

    Patch(
        YourDataSource,
        Defaults(YourDataSource),
        {
            Title : TextInput2_4.Text, 
        }
    );
    Set(ConfirmPopUpSC,false);
     
    Dropdown Item property : YourDataSource
                                    Value: Title or Column Name


    Thanks!

    If my response has been helpful in resolving your issue, I kindly request that you consider clicking "Accept as solution" and "giving it a thumbs up" as a token of appreciation.
     
  • MollyWeasley89 Profile Picture
    18 on at

    Rajkumar, 

     

    Thanks for your response. I am using this option you gave 

    If you want store permanent use SharePoint List or Excel as a database and connect to Powerapps
     
    In On Select button property put this :

    Patch(
        YourDataSource,
        Defaults(YourDataSource),
        {
            Title : TextInput2_4.Text, 
        }
    );
    Set(ConfirmPopUpSC,false);
     
    Dropdown Item property : YourDataSource
                                    Value: Title or Column Name
    The highlighted part in red - I am unsure what to do with that? Formula wise? I don't see Value as a property and do not know what you mean for me to do.
  • Rajkumar_M Profile Picture
    3,743 Moderator on at

    Hi

    You will be able to find Value in dropdown properties tab in the Right side of the screen as shown below.

    Rajkumar_404_0-1689604154275.png

    Thanks!

    If my response has been helpful in resolving your issue, I kindly request that you consider clicking "Accept as solution" and "giving it a thumbs up" as a token of appreciation.

     

  • MollyWeasley89 Profile Picture
    18 on at

    Thanks so much for the response. This is what my version looks like I can't figure out where to change data source for value of the dropdown

    image.pngimage.png

  • Rajkumar_M Profile Picture
    3,743 Moderator on at

    Please provide a screenshot of the Tree View on the left side of your app's screen.

  • MollyWeasley89 Profile Picture
    18 on at

    Thanks for writing back and sorry I am having such difficultyimage.png

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!

Leaderboard > Power Apps

#1
Haque Profile Picture

Haque 88

#2
WarrenBelz Profile Picture

WarrenBelz 85 Most Valuable Professional

#3
Valantis Profile Picture

Valantis 45

Last 30 days Overall leaderboard