cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
daleritf
Level: Powered On

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
daleritf
Level: Powered On

Re: Getting SharePoint Lookup Column to display values

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
PowerApps Staff murali
PowerApps Staff

Re: Getting SharePoint Lookup Column to display values

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

 

daleritf
Level: Powered On

Re: Getting SharePoint Lookup Column to display values

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.

 

PowerApps Staff murali
PowerApps Staff

Re: Getting SharePoint Lookup Column to display values

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

daleritf
Level: Powered On

Re: Getting SharePoint Lookup Column to display values

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.

PowerApps Staff murali
PowerApps Staff

Re: Getting SharePoint Lookup Column to display values

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

 

daleritf
Level: Powered On

Re: Getting SharePoint Lookup Column to display values

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

PowerApps Staff murali
PowerApps Staff

Re: Getting SharePoint Lookup Column to display values

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

Highlighted
daleritf
Level: Powered On

Re: Getting SharePoint Lookup Column to display values

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

I really appreciate your patience and help!

Helpful resources

Announcements
thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

Top Kudoed Authors
Users Online
Currently online: 287 members 6,127 guests
Please welcome our newest community members: