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 / How to connect a text ...
Power Apps
Answered

How to connect a text field to a drop down with predefined values?

(0) ShareShare
ReportReport
Posted on by 19

I have a drop down with some values, one is "Other".

How can I add a text field for entering an other value when the "Other" value is selected in the drop down?

The text value should be stored in the same field as where the predefined values are stored.

Categories:
  • mdevaney Profile Picture
    29,993 Moderator on at

    @RemcodeB 

    Here's a mini-tutorial I have made just for you.

     

    #1 We start by creating an EditForm with a single Dropdown.  The field Color Selection is a Text field in Sharepoint so we must use the following code in the Items property to define the Choices.

     

    dd1.PNG

     

    #2 Click Other on the Dropdown

     

    dd2.png

     

    #3 Create a new TextInput within the same datacard as the Dropdown.  Use the following code in the Visible property to make the field show/hide when Other is selected/not selected.

     

    dd3.PNG

     

    #4 Finally, click on the datacard holding both the Dropdown and TextInput and put this code in the Update property.  When Other is selected the TextInput contents will be submitted to Sharepoint and otherwise the Dropdown contents will be submitted instead.

     

    dd4.PNG

     

    #5.  Create a button with the following code in the OnSelect property and then click it.  Your info will now be changed in Sharepoint.

     

    SubmitForm(your_form_name);

     

    ---
    Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

  • RemcodeB Profile Picture
    19 on at

    This is exactly what I was looking for.

    But now I have another question:

    When I have entered another color like "Pink" and I reopen the Form in edit mode the Dropdown is empty and the Textinput is not displayed.

    How can I display the "Other" values when reopening the Form in edit mode?

  • Verified answer
    mdevaney Profile Picture
    29,993 Moderator on at

    @RemcodeB 

    To do this I would add some code to the Default properties of both Dropdown1 and TextInput1.  Continuing my previous example: put this code in the Default property of TextInput1.

     

    If(
     Not(ThisItem.Color in ["Red","Black","Blue"]),
     ThisItem.Color,
     Blank()
    )

     

    Then put this code in the Default property of DropDown1.

     

    If(
     ThisItem.Color in ["Red","Black","Blue"],
     ThisItem.Color,
     "Other"
    )

     

    I'll ask you to please test this solution for me and if it does not work I will setup a test again on my side.

    ---
    Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

  • RemcodeB Profile Picture
    19 on at

    I get errors when I try to implement your solution.

    In my app I have a dropdown with Items = ["","Study","Holiday","Other"]

    I have tried to adjust your solution:  

     Not(ThisItem.Color in ["Red","Black","Blue"]),

     to :

    Not(ThisItem.'column name' in ["","Study","Holiday""Other"]),

    The error message is "Expected operator."

    I have copied your examples and only changed Color to 'column name' and substituted your values by my Item values.

    So I do not see a missing operator (comma).

    I have tried to add .Text after the column name but that did not solve the error.

  • mdevaney Profile Picture
    29,993 Moderator on at

    @RemcodeB 

    The issue appears to be the semi-colon ( ; ) I put at the end of each code block.  My corrected code is in the original post above.  Please remove the semi-colon and the error will go away.  I've made sure to test on my side.  Let me know if it works for you.

     

    ---
    Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

  • RemcodeB Profile Picture
    19 on at

    The semi-colon was the issue, now it works like a charm 😊

    Thank you for all your quick responses, I have learnt a lot.

  • mdevaney Profile Picture
    29,993 Moderator on at

    @RemcodeB 

    You are very welcome.  Hopefully we can connect again soon.

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 381 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 340

#3
WarrenBelz Profile Picture

WarrenBelz 187 Most Valuable Professional

Last 30 days Overall leaderboard