Power Apps Lookup SharePoint List

Do you know how to add a SharePoint lookup column in Power Apps? If not, no need to worry!

This Power Apps tutorial will teach all the information about the Power Apps lookup SharePoint list. Here, we will discuss how to add a SharePoint lookup column in Power Apps using two ways. Such as:

  1. Power Apps Lookup SharePoint List Using Customized Forms
  2. Power Apps Lookup SharePoint List Using Dropdown Control

Power Apps Lookup SharePoint List

Let’s see how to add a SharePoint lookup list lookup column in Power Apps using two different examples.

Example – 1:

I have two SharePoint Online lists, i.e., [“Employee Onboarding” and “Employee Departements] and the first SharePoint list contains the below fields.

Column NameData Type
Employee IDIt is a default single line of text
Employee NameA single line of text column
EmailA single line of text column
GenderChoice
Joining DateDate and time
Employee DepartmentA single line of text
lookup sharepoint list in powerapps

The second SharePoint list [Employee Departements] contains the fields as shown below.

Column NameData Type
Employee DepartmentIt is a default single line of text column
Department ManagerA single line of text

Refer to the below image:

powerapps sharepoint lookup column

In Power Apps, there is a SharePoint list customized form, now I want to add a SharePoint lookup column in the dropdown control as in the screenshot below.

lookup sharepoint list powerapps

To work around this example, follow the below-mentioned steps. Such as:

1. Open respective SharePoint Online list [Employee Onboarding] -> Expand the Integrate dropdown, select Power Apps, and click on the Customize forms as shown below.

powerapps sharepoint list lookup column

2. When you click on the Customize forms, the Powerapps form will appear with SharePoint list fields.

See also  How to Submit Form to SharePoint List in Power Apps?

3. Also, you can add or remove the unwanted columns from the Edit fields section (Properties -> Edit fields) as shown below.

lookup powerapps sharepoint list

4. Here, Since the “Employee Department” field is a Text data type. Now, I want to make this field as a Lookup field by using another List column from the “Employee Department list”.

5. To make the field as a Lookup field in PowerApps, select the Employee Department Data card and unlock it (Advanced -> Unlock). Once it unlocks, just remove or delete that Data card value text box.

lookup a sharepoint list in powerapps

6. Now insert a Dropdown control (Insert -> Input -> Dropdown) inside the Employee Department Data card.

powerapps sharepoint list lookup column

7. Just drag and resize the dropdown control as per your need. If you select the dropdown control, then you can see its Items property as DropDownSample. Also, you can rename the Dropdown control. By default, the name will be Dropdown1.

powerapps sharepoint online list lookup column

8. Now, we need to add another SharePoint list, i.e., [Employee Departments] to the Power Apps like below.

power app lookup sharepoint list

9. Next, select the Dropdown control and set its Items property to the code below.

Items = 'Employee Departments'.Title

Where,

  • ‘Employee Departments’ = Second SharePoint Online List
  • Title = SharePoint List Text Field

10. Now, in the Powerapps Customize form, the Dropdown control is to get all the options in the Title field [From the Employee Departments List].

power app lookup sharepoint online list

11. Now we will talk about the errors that appear in the “Employee Department Data Card”. The errors are appearing because of the Dropdown Data card value.

12. As we have changed the data card value from the text box to the dropdown box, that’s why we need to pass the dropdown card value to the Employee Department Data Card’s Update property as well as the property (Height property).

Update = drp_Depatments. Selected.Title

Y = drp_Depatments. Height

Where,

  • drp_Depatments = Power Apps Dropdown Value
lookup sharepoint online list powerapps

13. Once your app is ready, Save, Publish, and Preview the app. Whenever the user clicks on the dropdown control, it will display all the lookup column values as shown below.

lookup sharepoint list in powerapps

This is all about the Power Apps lookup SharePoint list using customized forms.

See also  Power Apps Toggle Control + 10 Examples

Power Apps Lookup SharePoint List Using Dropdown Control

I have a SharePoint Online List, i.e., [Patient Tracker]. This list contains the below fields.

Column NameData Type
Patient IDThis is a default single line of text; I just renamed it as “Patient ID”
NameA single line of text
Date Of BirthDate and time
DiseaseDisease
powerapps lookup field value

This SharePoint lookup column [Disease] is added from another SharePoint source list named “Diseases List“. This list contains the below fields.

Column NameData Type
DiseaseIt is a default single line of text, I just renamed it as “Disease”
Doctor’s NameA single line of text
Doctor’s ExperienceNumber
Doctor’s FeesCurrency

Refer to the below screenshot:

powerapps sharepoint lookup field value

In Power Apps, a “New Form” is connected to the SharePoint Online list. This form contains a Dropdown field called Disease [Lookup Column], having values like Diarrhea, Influenza, Lyme disease, etc.

When a user selects any value from the dropdown control, the text inputs will display the disease-related doctor’s name and fees based on the selected disease.

powerapps lookup from another list

To achieve the above example, follow the below-mentioned steps. Such as:

1. Create Power Apps Canvas app -> Connect to the SharePoint Online list [Patient Tracker]. Once the SharePoint list is added, it will appear under the Data section below.

powerapps lookup from another sharepoint list

2. Insert an Edit form [frm_NewPatient] -> set its DataSource as:

DataSurce = 'Patient Tracker'

Where,

  • ‘Patient Tracker’ = SharePoint Online List

3. To display the SharePoint list fields in the form control, click the Edit fields option and add fields as needed.

4. To get the Edit Form to a New form, just set the Default mode as “New” as in the screenshot below.

powerapp lookup from sharepoint list

5. Insert a Text input [Textinput_Doctor’sName] control inside the form and set its Default property to the code below.

Default = LookUp(
    'Patient Tracker',
    Disease.Value = drp_Disesase.Selected.Value,
    'Disease: Doctor''s Name'.Value
)

Where,

  • LookUp() = This Power Apps LookUp() function is used to find a single record that matches one or more criteria
  • ‘Patient Tracker’ = SharePoint Online List
  • Disease.Value = SharePoint lookup field value
  • drp_Disesase = Dropdown Control Name
  • ‘Disease: Doctor”s Name’ = It is a SharePoint additional column from the source list
powerapps lookup function sharepoint list

6. Then, insert another Text input control [Textinput_Doctor’sFees] -> Set its Default property as:

Default = LookUp(
    'Diseases List',
    Disease = drp_Disesase.Selected.Value,
    'Doctor''s Fees'
)

Where,

  • ‘Diseases List’ = SharePoint Source List
  • Disease = SharePoint Lookup column
  • ‘Doctor”s Fees’ = SharePoint Currency Field
powerapps lookup dropdown

7. SavePublish, and Preview the app. If a user selects any value from the dropdown control, then text inputs will display the values based on the dropdown selected value, as shown below.

powerapps lookup sharepoint list

Conclusion

This Power Apps tutorial taught all the Power Apps lookup SharePoint list information. Here, we discussed how to add a SharePoint lookup column in Power Apps using two ways. Such as:

  1. Power Apps Lookup SharePoint List Using Customized Forms
  2. Power Apps Lookup SharePoint List Using Dropdown Control
See also  How to get data from Dataverse in Power Apps

You may also like:

  • This works fine on a new selection, but the lookup field is blank on existing records. I tried substituting several other things, like “ThisItem.fieldname”, but get an error that the formula uses scope, which is not supported.

    This article got me closer than anything else… trying to get the last hurdle.

  • I actually figured out my last question but I have ran into a strange issue. I have this working all fields are now submitting to my sharepoint list. Problem is, when I open the form back up to edit the data is not retained in the form….

  • >