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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Getting SharePoint Loo...
Power Apps
Answered

Getting SharePoint Lookup Column to display values

(0) ShareShare
ReportReport
Posted on by 99

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

Categories:
I have the same question (0)
  • murali Profile Picture
    Microsoft Employee on at

    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 Profile Picture
    99 on at

    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.

     

  • murali Profile Picture
    Microsoft Employee on at

    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 Profile Picture
    99 on at

    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.

  • murali Profile Picture
    Microsoft Employee on at

    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

     

  • Verified answer
    daleritf Profile Picture
    99 on at

    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.

  • murali Profile Picture
    Microsoft Employee on at

    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

  • daleritf Profile Picture
    99 on at

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

    I really appreciate your patience and help!

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 528

#2
WarrenBelz Profile Picture

WarrenBelz 426 Most Valuable Professional

#3
Valantis Profile Picture

Valantis 306

Last 30 days Overall leaderboard