Skip to main content

Notifications

Power Apps - Building 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);

  • MollyWeasley89 Profile Picture
    MollyWeasley89 18 on at
    Re: User-Inputs New Choice for a Dropdown through a pop-up text input - how do I make that choice autoselected in the dropdown?

    image.png

  • Rajkumar_404 Profile Picture
    Rajkumar_404 557 on at
    Re: User-Inputs New Choice for a Dropdown through a pop-up text input - how do I make that choice autoselected in the dropdown?

    I'm not sure where you are using dropdown control in your app.

    Thanks! 


  • MollyWeasley89 Profile Picture
    MollyWeasley89 18 on at
    Re: User-Inputs New Choice for a Dropdown through a pop-up text input - how do I make that choice autoselected in the dropdown?

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

  • Rajkumar_404 Profile Picture
    Rajkumar_404 557 on at
    Re: User-Inputs New Choice for a Dropdown through a pop-up text input - how do I make that choice autoselected in the dropdown?

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

  • MollyWeasley89 Profile Picture
    MollyWeasley89 18 on at
    Re: User-Inputs New Choice for a Dropdown through a pop-up text input - how do I make that choice autoselected in the dropdown?

    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_404 Profile Picture
    Rajkumar_404 557 on at
    Re: User-Inputs New Choice for a Dropdown through a pop-up text input - how do I make that choice autoselected in the dropdown?

    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
    MollyWeasley89 18 on at
    Re: User-Inputs New Choice for a Dropdown through a pop-up text input - how do I make that choice autoselected in the dropdown?

    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_404 Profile Picture
    Rajkumar_404 557 on at
    Re: User-Inputs New Choice for a Dropdown through a pop-up text input - how do I make that choice autoselected in the dropdown?
    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
    MollyWeasley89 18 on at
    Re: User-Inputs New Choice for a Dropdown through a pop-up text input - how do I make that choice autoselected in the dropdown?

    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_404 Profile Picture
    Rajkumar_404 557 on at
    Re: User-Inputs New Choice for a Dropdown through a pop-up text input - how do I make that choice autoselected in the dropdown?

    SelectedChoice is not a function its Variable name.

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

Microsoft Kickstarter Events…

Register for Microsoft Kickstarter Events…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Announcing Forum Attachment Improvements!

We're excited to announce that attachments for replies in forums and improved…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 145,526

#2
RandyHayes Profile Picture

RandyHayes 76,287

#3
Pstork1 Profile Picture

Pstork1 64,907

Leaderboard