web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Display Email based on...
Power Apps
Answered

Display Email based on Dropdown Value Selected

(0) ShareShare
ReportReport
Posted on by 68

Hi,

 

I have list called ndaBusinessUnits that has 4 columns. (screenshot attached)

 

ndaBUSU - Single Line of Text 

ndaBUSUResponsiblePrimary - People or Group

ndaBUSUResponsibleSecondary - People or Group

ndaBUSUResponsibleTertiary - People or Group

 

The app (attached) has a dropdown that displays all rows in column ndaBUSU

 

Distinct([@ndaBusinessUnits], ndaBUSU)

 

What I need to achieve is that based on the selected dropdown (Custom Card - Allowed Values) value the  ndaBUSUResponsiblePrimary,  ndaBUSUResponsibleSecondary,  ndaBUSUResponsibleTertiary are populated with the values (Display Name / Email) from the same row.

 

What is the best way to achieve this ?

 

Many Thanks
Darren

 

Categories:
I have the same question (0)
  • Verified answer
    v-xida-msft Profile Picture
    on at

    Hi @marsdendd ,

    Based on the needs that you mentioned, I think the LookUp function could achieve your needs.

     

    I have made a test on my side, please consider take a try with the following workaround:

    Set the DefaultSelectedItems property of the ndaBUSUResponsiblePrimary ComboBox to following:

    If(
     !IsBlank(ndaBUSUDropdown.Selected.Result),
     LookUp(ndaBusinessUnits, ndaBUSU = ndaBUSUDropdown.Selected.Result, ndaBUSUResponsiblePrimary),
     Parent.Default
    )

    Set the DefaultSelectedItems property of the ndaBUSUResponsibleSecondary ComboBox to following:

    If(
     !IsBlank(ndaBUSUDropdown.Selected.Result),
     LookUp(ndaBusinessUnits, ndaBUSU = ndaBUSUDropdown.Selected.Result, ndaBUSUResponsibleSecondary),
     Parent.Default
    )

    Set the DefaultSelectedItems property of the ndaBUSUResponsibleTertiary ComboBox to following:

    If(
     !IsBlank(ndaBUSUDropdown.Selected.Result),
     LookUp(ndaBusinessUnits, ndaBUSU = ndaBUSUDropdown.Selected.Result, ndaBUSUResponsibleTertiary),
     Parent.Default
    )

     

    Please consider take a try with above solution, check if the issue is solved.

     

    Best regards,

  • marsdendd Profile Picture
    68 on at

    Hi Kris,

     

    Thank You!

     

    I was making an error in my approach.  I was putting my code in the items property which meant I had to manually select the dropdown to populate the field.

     

    The provided solution is almost perfect however I still have a small issue.  The remaining issue is the display name is displayed not the email.

     

    I enclose 2 screenshots. 

     

    Using the code you provided I tried adding the .Email to ndaBUSUResponsiblePrimary).Email    

     

    As you can see the email is resolved  (DisplayName-Err.png) but does not display in the field. 

     

    Darren

     

     

    DisplayName-Err.PNG
    DisplayName.PNG
  • Verified answer
    v-xida-msft Profile Picture
    on at

    Hi @marsdendd ,

    Based on the formula you modified, I think there is something wrong with it. The DefaultSelectedItems property of the ndaBUSUResponsiblePrimary ComboBox is required to provided a Record value, but the LookUp(ndaBusinessUnits, ndaBUSU = ndaBUSUDropdown.Selected.Result, ndaBUSUResponsiblePrimary).Email would return a Text value.

     

    Please set the DefaultSelectedItems property of the ndaBUSUResponsiblePrimary ComboBox to following:

    If(
     !IsBlank(ndaBUSUDropdown.Selected.Result),
     LookUp(ndaBusinessUnits, ndaBUSU = ndaBUSUDropdown.Selected.Result, ndaBUSUResponsiblePrimary),
     Parent.Default
    )

    If you want the email of the selected person to be also displayed as display value within the ndaBUSUResponsiblePrimary ComboBox, I afraid that there is no way to achieve your needs. Please note that -- only Primary text column could be used as display value within the ndaBUSUResponsiblePrimary ComboBox.

    1.JPG

     

     

    Best regards,

  • marsdendd Profile Picture
    68 on at

    Perfect!!

     

    Changing the primary text did the trick.

     

    I have uploaded the solution to the question for anyone else who may encounter a similar issue.

     

    Thank You so much.

     

     

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
Kalathiya Profile Picture

Kalathiya 408

#2
WarrenBelz Profile Picture

WarrenBelz 382 Most Valuable Professional

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 328 Super User 2025 Season 2

Last 30 days Overall leaderboard