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 / Hard code result for d...
Power Apps
Answered

Hard code result for dependant drop down in form

(0) ShareShare
ReportReport
Posted on by

Hi all,

 

Quick question, I have a simple new form capture, with a variety of questions for the user to answer. The data is then submitted to SharePoint list.

 

One of my drop-downs within the form is a choice to select a team. I have a second field (single line of text column) for the corresponding email.

 

I am trying to may the form more user friendly, and want to break the parent control and hard code the email address to pre-populate based on the team dropdown choice.

 

Can this be done in a form? I have had success with this when I build with various inputs, but I'm running into a few blocks with the form.

 

Any assistance would be greatly appreciated.

Categories:
  • Verified answer
    TheRobRush Profile Picture
    11,128 Moderator on at

    Made up a test form for you and did this two different ways.

    My dropdown has options of 1, 2, or 3

    Option 1 in the dropdown OnChange I placed

    Switch(Self.Selected.Value,
    "1", Set(varDrop,"Option1@Gmail.com"),
    "2", Set(varDrop,"Option2@Gmail.com"),
    Set(varDrop,"Option3@Gmail.com") )

    then in text or label of another datacard i placed default as varDrop (if it does not appear as you change dropdown selections be SURE that it is text/number set to same data type as the column the datacard is for)

    this method chanegd the default value in the control every time i swapped dropdown options, works great

     

    another way in another datacard i put another label and gave it the default value of

    Switch(Dropdown2.Selected.Value,
    "1", "Option1@Gmail.com",
    "2", "Option2@Gmail.com",
    "Option3@Gmail.com")

     

    and this also achieved same results, so two options for you. Take care 🙂

     

  • Verified answer
    SectorOMEGA Profile Picture
    338 on at

    I was successful with this case using Switch. Maybe you can try it like this for the text property of the Single Line Datacard:

     

    Switch(Dropdown1.Selected.Value,
    "Team 1", "Team 1 Email",
    "Team 2", "Team 2 Email")

     

    Hope will be this simple.
    @TheRobRush Was faster 🙂

  • DGWolfe Profile Picture
    on at

    Thank you @TheRobRush I had tried the second, but my formula was wrong! Much appreciated.

  • DGWolfe Profile Picture
    on at

    Thank you @SectorOMEGA 🙂

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 405 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 368

#3
WarrenBelz Profile Picture

WarrenBelz 244 Most Valuable Professional

Last 30 days Overall leaderboard