Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Apps - Building Power Apps
Unanswered

Help Submitting DataCard with either a dropdown Value or a TextInput

(1) ShareShare
ReportReport
Posted on by 378
In my update function, I've tried using an IF Statement but getting an error message.
 
Basically I have a dropdown value and if the choice is other a textbox (textinput appears) need to add that value to the datacard Update Property.
  • Suggested answer
    LukasToman Profile Picture
    29 on at
    Help Submitting DataCard with either a dropdown Value or a TextInput

    To achieve the functionality where you submit a DataCard value based on either a dropdown selection or a TextInput in PowerApps, especially when you have a condition that shows a TextInput if the dropdown selection is "Other", you can use an If statement within the DataCard's Update property. However, the correct syntax and logic are crucial to avoid errors.

    Here's a step-by-step guide on how to set this up:

    Step 1: Setup Your Dropdown and TextInput

    • Assume your dropdown control is named Dropdown1.
    • Your TextInput control is named TextInput1.
    • The dropdown has a choice called "Other", which, when selected, makes TextInput1 visible.

    Step 2: Configure the Visibility of TextInput1

    Set the Visible property of TextInput1 to:

    Dropdown1.Selected.Value = "Other"

    This makes TextInput1 visible only when "Other" is selected in Dropdown1.

    Step 3: Configure the Update Property of the DataCard

    To submit the value from either the dropdown or the TextInput based on the condition, you will use an If statement in the Update property of the DataCard. The Update property should be set to something like this:

    If(Dropdown1.Selected.Value = "Other", TextInput1.Text, Dropdown1.Selected.Value)

    This If statement checks if the selected value of Dropdown1 is "Other". If it is, it uses the text from TextInput1 for the update. Otherwise, it uses the selected value from Dropdown1.

    Common Mistakes and Solutions

    1. Incorrect Control Names: Ensure the control names used in the formula match exactly with those in your app.
    2. Data Types Mismatch: Make sure the data types expected by the DataCard's Update property match with what you're providing. For example, if the DataCard expects text, both parts of the If statement should return text.
    3. Complex Data Types: If your dropdown is bound to a complex data type (e.g., a table), you might need to adjust the formula to reference the correct property, like Dropdown1.Selected.Text instead of Dropdown1.Selected.Value.

    By following these steps and considerations, you should be able to configure your DataCard to submit data based on either a dropdown selection or a TextInput value without encountering errors.

  • olsen9 Profile Picture
    378 on at
    Help Submitting DataCard with either a dropdown Value or a TextInput
    If statements work but in this case if you are using a choice drop down you must use {Value: dropdown1.selected.value]
     
    Which was my issue.  Using that resolved my issue.  Keep in mind this is for choice drop down options only
  • Buckszido Profile Picture
    6 on at
    Help Submitting DataCard with either a dropdown Value or a TextInput
    I normally use an IF statement to accomplish this and set my update funtion to:
     
    if(Dropdown.Selected.<Your dropdown column> = "Other", TextInput.Text(Your other textinput), Dropdown.Selected.<Your dropdown column>)
  • Michael E. Gernaey Profile Picture
    43,442 Super User 2025 Season 1 on at
    Help Submitting DataCard with either a dropdown Value or a TextInput
    Hi please share more
    what error?
     
    I don’t follow what you are saying. Please use examples. 

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

Michael Gernaey – Community Spotlight

We are honored to recognize Michael Gernaey as our June 2025 Community…

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 770 Most Valuable Professional

#2
stampcoin Profile Picture

stampcoin 494

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 399