cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
markymark
New Member

Displaying 2nd column data from dropdown in a textbox

Hello, I am trying to build my first app (my 2nd day working in powerapps), so excuse me in advance.

 

I have successfully implemented a dropdown where the data is collected from 2 column sharepoint list. 

For the sake of clarity;

Name             Emailadress

 

The dropdown is distinct(table1,name), and also some sort().

 

I have text box to the right where I want to showcase the emailadress of the name selected.

I am thinking it is probably really easy, and I have looked up on Shane Young youtube and googled alot, and still cant find it. Also spent close to an hour figuring out concat formula, which I still dont fully understand.

 

Any advice is appreciated.

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
BCBuizer
Super User
Super User

Hi @markymark ,

 

To populate the textbox with an Email address, based on the selection in your Drodown, you can use the LookUp() function:

 

LookUp(table1, Name = Dropdown.Selected.Result, EmailAddress)

 

In simple turns this performs a LookUp() in table1 where the Name is the same as the selected name in the Dropdown and then returns the EmailAddress for the first item it finds.



Did you like my post? Please give it a thumbs up! Did I resolve your issue? Please click Accept as Solution to close the topic and so other members of the community can find solutions more easily.

View solution in original post

3 REPLIES 3
Drrickryp
Super User
Super User

@markymark 

There is no need for Distinct(). Simply sort your list by name. A dropdown contains the entire record even though only one field is shown in the window. The Emailadress can be obtained by reference to the dropdown as

Dropdown1.Selected.Emailadress

Distinct replaces the list with a single column table of unique values and renames the column Result.

BCBuizer
Super User
Super User

Hi @markymark ,

 

To populate the textbox with an Email address, based on the selection in your Drodown, you can use the LookUp() function:

 

LookUp(table1, Name = Dropdown.Selected.Result, EmailAddress)

 

In simple turns this performs a LookUp() in table1 where the Name is the same as the selected name in the Dropdown and then returns the EmailAddress for the first item it finds.



Did you like my post? Please give it a thumbs up! Did I resolve your issue? Please click Accept as Solution to close the topic and so other members of the community can find solutions more easily.
markymark
New Member

That was indeed really simple. Thank you for your reply, I would probably be stuck for multiple hours.

 

I did have to use 'Name (Title)' = instead of name=, and I dont really know why. But I will probably understand that in the future.

Helpful resources

Announcements
October Events

Mark Your Calendars

So many events that are happening this month - don't miss out!

Ignite 2022

WHAT’S NEXT AT MICROSOFT IGNITE 2022

Explore the latest innovations, learn from product experts and partners, level up your skillset, and create connections from around the world.

Power Apps Africa Challenge 2022

Power Apps Africa Challenge

Your chance to join an engaging competition of Power Platform enthusiasts.

Top Solution Authors
Top Kudoed Authors
Users online (3,901)