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 / If dropdown1 selected ...
Power Apps
Answered

If dropdown1 selected value is X, select value y in dropdown2

(0) ShareShare
ReportReport
Posted on by 90

Hi,

 

I have a form with a choices field which links back to a SharePoint list (let's call it dropdown1) . This choices field contains a list of Divisions within the business (IT, HR, Finance etc).

 

I have a second choices field which contains a list of email addresses (the executive directors in charge of each of the divisions), let's call this dropdown2. 

 

I'm looking for an efficient way of linking the relationship between the Division and it's associated Executive Director, without the end user having to select both dropdowns in the form.  So for example, let's say Joe Bloggs is the IT director. When completing the form in the app the user would select 'IT' from dropdown1, this would then automatically select / populate dropdown2 with joe.bloggs@testcompany.com. 

 

To tackle this, I've looked at editing the 'OnChange' property of 'dropdown1' with an If statement:

 

If(dropdown1.Selected.Value="IT",

 

But then I'm a bit stuck with the 'then' statement, and looking through the list of functions I'm not even sure if what I'm attempting is possible. 

 

I don't suppose anyone's come across something similar? Or has a better way of achieving this?

 

Categories:
I have the same question (0)
  • WarrenBelz Profile Picture
    156,425 Most Valuable Professional on at

    HI @Tricky778 ,

    So you want to populate DropDown2 with all the email addresses of the division Selected in DropDown1?

    Or do you just want to find the email address of the Director (DropDown not needed as this is a single value field - text will do)

    For the text box/label - I will call your list MyList - and assumed the other names Division and EmailAddress - replace with your names

    Lookup(
     MyList,
     Division = DropDown1.Selected.Division,
     EMailAddress
    )

    If you wanted the address of all emails in the division in a gallery

    Filter(
     MyList,
     Division = DropDown1.Selected.Division
    )

    If you wanted the address of all emails in the division in a dropdown

    Filter(
     MyList,
     Division = DropDown1.Selected.Division
    ).EmailAddress

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

  • Tricky778 Profile Picture
    90 on at

    Hi Warren,

     

    Thanks for the reply. The behaviour I'm looking for is as follows:

     

    If User selects 'PLC' in the 'Division' choice field, the Executive Sponsor field is auto set to 'joe.bloggs@email.com'.

    If User selects 'IT' in the 'Division' choice field, then Executive Sponsor field is auto set to 'dave.smith@email.com' and so forth. 

     

    Rightly or wrongly...I went about this by creating a 'Division' choice field in SharePoint with all our divisions, and an 'Executive Sponsor' choice field with all our divisional execs email addresses. And then pulled both fields through to the form in SharePoint.

     

    I guess a picture paints a thousand words (please see pic below).

     

     Capture.JPG

     

     

    Hope this helps explain the scenario

  • Verified answer
    WarrenBelz Profile Picture
    156,425 Most Valuable Professional on at

    OK @Tricky778 ,

    The problem you have is that the items of a Choices field has no relationship with anything and PowerApps (or SharePoint) cannot possibly know "what belongs to what".

    I will give you another scenario.

    Create another list with Division and ExecutiveSponsor and input the matching items - I will call it Sponsors in the code below.

    You can leave the Division as a Choice field for the moment, but maintenance would be better if it was also based off this list, but it is a bit more complex. I would also turn the ExecutiveSponsor field in the main list into a plain Text field as there is no need for the user to choose. I will call your list YourSPList and the columns Division and ExecutiveSponsor and also ddDivision for the first drop down.

    So two things - the Default of the text field (ExecSponsor used - YourForm for form name)

    If(
     YourFormName.Mode = FormMode.New && 
     !isBlank(ddDivision,
     Lookup(
     Sponsors,
     Division = ddDivision.Selected.Value,
     ExecutiveSponsor
     ),
     Parent.Default
    )

    On the OnChange of ddDivision

    Reset(ExecSponsor)

    Happy to elaborate further.

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

     

     

     

     

  • Tricky778 Profile Picture
    90 on at

    Thanks @WarrenBelz 

    This provided a good solution the scenario 👍

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

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 345 Most Valuable Professional

#2
11manish Profile Picture

11manish 207 Super User 2026 Season 2

#3
Mohsin Ali Profile Picture

Mohsin Ali 177

Last 30 days Overall leaderboard