Skip to main content

Notifications

Power Apps - Building 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:
  • marsdendd Profile Picture
    marsdendd 68 on at
    Re: Display Email based on Dropdown Value Selected

    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.

     

     

  • Verified answer
    v-xida-msft Profile Picture
    v-xida-msft on at
    Re: Display Email based on Dropdown Value Selected

    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
    marsdendd 68 on at
    Re: Display Email based on Dropdown Value Selected

    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

     

     

  • Verified answer
    v-xida-msft Profile Picture
    v-xida-msft on at
    Re: Display Email based on Dropdown Value Selected

    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,

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

Microsoft Kickstarter Events…

Register for Microsoft Kickstarter Events…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Announcing Forum Attachment Improvements!

We're excited to announce that attachments for replies in forums and improved…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 145,343

#2
RandyHayes Profile Picture

RandyHayes 76,287

#3
Pstork1 Profile Picture

Pstork1 64,703

Leaderboard