cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
daleritf
Helper II
Helper II

Getting SharePoint Lookup Column to display values

Schenario:

I have two SharePoint Lists:

* Facility list

Columns: Facility Name, Address, Responsible Person, Primary Pharmacy (Lookup column from Pharmacy List)

 

*Pharmacy list

Columns: Pharmacy Name, Address, Phone Number

 

I have created an App where I display all my facilities where I show my Pharmacy column as:

BrowseGallery1.Selected.Primary_x0020_Pharmacy.Value

 

What I want is when I click on Primary Pharmacy name is to move to a different screen and get the detailed information of the Pharmacy as : Pharmacy Name, Address, Phone Number (whis is in the SarePoint Pharmacy list)

 

Please help in achieving this goal.

 

I would appreciate any help

1 ACCEPTED SOLUTION

Accepted Solutions

I might be doing something wrong. I am getting blank page in the result (No Data)

 

Here is what I have :

1. On the  Mane page I am retrieving the Pharmacy Name by (Text Field): BrowseGallery1.Selected.Primary_x0020_Pharmacy.Value 

 

2. I created the Screen (Screen2), where I inserted the Form -> Display Form

 

3. I set the Data source to "Pharmacy List" (name of sharePoint List)

 

4. In the Item I set Item = LookUp('Pharmacy List', 'Title'= Gallery1.Selected.Primary_x0020_Pharmacy.Value)

The reason you See Title in the formula is because Pharmacy name column's internal Name is Title.

 

5. On my text box (Pharmacy name) in the the general scree I set OnSelect = Navigate(Screen2, ScreenTransition.None)

 

In the result I see blank screen (No Data)

 

Again, thank you for your help.

View solution in original post

8 REPLIES 8
murali
Power Apps
Power Apps

You could do the following

 

Add a DetailForm with

DataSource = 'Pharmacy List'

Item = LookUp('Pharmacy List', 'Pharmacy Name'= Gallery1.Selected.Primary_x0020_Pharmacy.Value)

 

This assumes that the lookup field is Pharmacy Name from Pharmacy List.

 

Hope this helps.

 

Murali

 

Thank you for the information.

Would you please give me little more details.. I am very new in PowerApps.

 

Shell I create a new Screen and Add DisplayForm with Pharmacy List as a datasource?

 

Where should I use this formula? On the click event or on the DetailForm 

Item = LookUp('Pharmacy List', 'Pharmacy Name'= Gallery1.Selected.Primary_x0020_Pharmacy.Value)

 

Thank you again.

 

Yes. Since your requirement was to navigate to a different screen to display Pharmacy details, you need to create a new screen with a DetailForm in it.

 

On the form, set the DataSource property and Item property as follows

DataSource = 'Pharmacy List'

Item = LookUp('Pharmacy List', 'Pharmacy Name'= Gallery1.Selected.Primary_x0020_Pharmacy.Value)

 

Hope this helps.

 

Murali

Thanks.

 

Since I am displaing the name of the Pharmacy on General page, I need to be able to click and navigate to that detailed screen where I am showing detailed information. How should I set up on Click event?

 

Sorry for all these questions.

No problem. Your questions are welcome.

 

Are you displaying the name of the Pharmacy with a Textbox? If so, you can hook this up in the "OnSelect" action.

 

OnSelect = Navigate(PharmacyDetailsScreen, ScreenTransition.None)

 

Murali

 

I might be doing something wrong. I am getting blank page in the result (No Data)

 

Here is what I have :

1. On the  Mane page I am retrieving the Pharmacy Name by (Text Field): BrowseGallery1.Selected.Primary_x0020_Pharmacy.Value 

 

2. I created the Screen (Screen2), where I inserted the Form -> Display Form

 

3. I set the Data source to "Pharmacy List" (name of sharePoint List)

 

4. In the Item I set Item = LookUp('Pharmacy List', 'Title'= Gallery1.Selected.Primary_x0020_Pharmacy.Value)

The reason you See Title in the formula is because Pharmacy name column's internal Name is Title.

 

5. On my text box (Pharmacy name) in the the general scree I set OnSelect = Navigate(Screen2, ScreenTransition.None)

 

In the result I see blank screen (No Data)

 

Again, thank you for your help.

Just to make sure, once you created the Display Form, did you import "Pharmacy List" datasource? If not, you need to do that. You can do that by clicking on "Connect your form to data" that gets displayed inside your Display Form. You can then customize the form to display the fields you are interested inSet datasource.JPGcustomization.JPG

Awesome.. Thank you very much.. Problem solved!!!!

I really appreciate your patience and help!

Helpful resources

Announcements
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.

Super User 2 - 2022 Congratulations

Welcome Super Users

The Super User program for 2022 - Season 2 has kicked off!

September Events 2022

Check out all of these events

Attend in person or online, there are incredible conferences and events happening all throughout the month of September.

Users online (2,997)