Your Microsoft Technology Development and Consulting Experts - Operating since 2000

Location
Australia WideSydney, NSWMelbourne, VicBrisbane, QldPerth, WAAdelaide, SACanberra, ACTNorthern Rivers, NSWWollongong, NSWRichmond, VicDarwin, NT
emailconsult@officeexperts.com.au
Phone1300 102 810
Office experts logo
Contact Us

Use SharePoint Lists Just Like a Relational Database in Power Apps

Link SharePoint lists with a single ID column, show only the related records in Power Apps and build parent-child apps without needing Dataverse or SQL Server.

By Marcello BrocchiUpdated · 14 min read
Two linked SharePoint listsAn Issues list with three rows and an Actions list with five rows. Each action has an IssueId that points back to one issue, and a Power Apps screen shows only the actions for the selected issue.IssuesIDTitle1Late delivery2Site access3Invoice errorActionsIDIssueIdTitle11Call courier22Book visit31Email client43Fix invoice51Log claimView IssueLate deliveryActions for this issueCall courierEmail clientAdd action
2 listsParent and childIssues and Actions, built from scratch.
1 columnDoes the linkingA number column called IssueId is the only link you add.
34 minVideo walkthroughThe same build, shown on screen from start to finish.

Introduction

While SharePoint lists aren’t technically relational databases, with the right approach you can implement parent-child relationships and create connected data structures that work remarkably well in Power Apps. This capability lets you build more sophisticated apps without needing SQL Server or Dataverse licences.

In this guide, I’ll show you how to structure, connect and manage related data across SharePoint lists. We’ll build a simple but practical example: an issue tracking system where each issue can have multiple related actions.

The same pattern sits behind many of the Power Apps solutions we build for clients at Office Experts: a handful of SharePoint lists, one number column that links them and a Power Apps front end that makes the data easy to work with. If you’ve ever ended up with columns called Action1, Action2 and Action3 in a single list, this is the cleaner alternative.

What you’ll learn
How to link two lists with an ID, show only related records in a gallery, save new child records, handle deletes and decide when this approach stops being the right one.

Prefer to watch the video?

Head over to my YouTube channel Chino Does Stuff to watch the video tutorial. There you’ll find a variety of videos with loads of tricks and tips on the entire Power Platform suite.

The video runs for about 34 minutes. The written steps below follow the same order, so you can pause at any point and jump to the matching part of this article.

Understanding the approach

To create relationships between SharePoint lists, we’ll use a classic database technique: adding a foreign key column that references the primary key of another table. In SharePoint terms:

  • The automatically generated ID column in SharePoint lists serves as our primary key
  • We’ll add a custom number column in the “child” list to store the ID of the related “parent” record
  • In Power Apps, we’ll use this relationship to filter and create related records

This creates a one-to-many relationship, where one record in the parent list can relate to many records in the child list.

How the IssueId column links two listsThe Issues list has an ID primary key. The Actions list has its own ID plus an IssueId foreign key that stores the ID of one issue. One issue can have many actions.Issues (parent list)IDPrimary keyTitleDescriptionActions (child list)IDPrimary keyIssueIdForeign keyTitleDescriptiononemanyOne Issue can have many Actions. Each Action stores the ID of one Issuein its IssueId column. That column is the only link between the lists.
The IssueId column in the child list stores the ID of one parent record.

Think of the IssueId column as a sticky note on each action that says “I belong to issue 1”. Nothing in SharePoint enforces it, so the app (and you) must keep it honest. That’s what the rest of this guide covers.

Why relate SharePoint lists at all?

Without a relationship, the usual workaround is to cram everything into one list. That works for a week, then falls apart as the repeated columns pile up and nobody trusts the data. A second list with a clear link solves it.

No repeated data

Each issue is stored once. Actions point to it by ID, so fixing an issue title in one place fixes it everywhere it appears.

Clean, focused screens

A gallery shows only the actions for the issue you’re looking at, instead of a long list you have to scan.

Room to grow

Add Comments, Reviews or Attachments later with another list and another ID column. You don’t have to redesign what you’ve already built.

What works and what doesn’t

It helps to be honest about where this approach shines and where it needs help from you.

What works well

  • One-to-many relationships, such as one project with many tasks
  • Filtering a gallery down to the related records with a delegable formula
  • Parent and child screens in the same app
  • Deeper chains, such as issues, actions and comments
  • Many-to-many links, by adding a third “junction” list that holds two ID columns

What you don’t get

  • Enforced referential integrity when you use a plain number column
  • Automatic cascade deletes when you use a plain number column
  • Server-side joins, so combining columns from two lists happens in the app and is limited by delegation
  • Very large lists, unless the linking column is indexed and every filter is delegable

Which relationship method should you use?

A number column that stores the parent’s ID is the method this guide builds, but it isn’t your only option. SharePoint also offers lookup columns, and when your needs outgrow lists you can move to a database platform. Answer two questions to see where you land.

Which way should you relate your SharePoint lists?Question one asks if the data will grow past tens of thousands of rows or needs strict integrity. If yes, use Dataverse or SQL Server. If no, question two asks if people also work in the SharePoint list directly and need to see the parent name. If yes, use a lookup column. If no, use a number column that holds the parent ID, which is the method in this guide.QUESTION 1Will the data grow past tens of thousandsof rows, or must it enforce strict integrity?BEST FITDataverse orSQL ServerQUESTION 2Do people also work in the SharePoint listdirectly and need to see the parent’s name?BEST FITSharePointlookup columnRECOMMENDED STARTNumber column holdingthe parent’s ID (this guide)Simplest to build andeasy to read in PowerFx formulas.YesYesNoNo
Two questions pick the method. Most small apps end up at the number column.
Comparison of three ways to relate data
CompareNumber column (this guide)Lookup columnDataverse or SQL Server
Setup effortAdd one Number columnAdd a Lookup column that points at the parent listBuild tables and relationships on a separate platform
Parent name visible in SharePoint viewsNo, only the IDYes, the lookup can show the parent’s titleYes, through relationships and views
Filtering in Power AppsEquality on a number, which is delegableFilter on the lookup’s ID, and test for delegation warningsRelationship queries, with delegation depending on the source
Integrity and cascade deletesNone, so you handle them in the appSharePoint can restrict or cascade deletes on lookup columns, so check your settingsBuilt in and configurable
Best forSimple apps, quick builds, small teamsApps where people also use the SharePoint list directlyLarge volumes, strict rules, complex reporting
Not sure? Start simple
The number column is the easiest method to build and to debug. Choose a lookup column when people will also live in the SharePoint list, and plan for a database platform when you need strict rules or large volumes. Confirm lookup behaviour in a test list before relying on it.

Build it step by step

Follow the five steps below. Each one matches a section of the video, and every formula can be pasted into your own app once you’ve renamed the controls.

  1. 1

    Set up the SharePoint lists

    We’ll start by creating two SharePoint lists to store our data:

    1. Issues list: the parent list that stores the main issues
    2. Actions list: the child list that stores actions related to each issue

    Here’s how to structure each list:

    SharePoint list columns
    Issues list
      Title         Single line of text (default)
      Description   Multiple lines of text
    
    Actions list
      Title         Single line of text (default)
      Description   Multiple lines of text
      IssueId       Number, 0 decimal places   <- the link back to the parent
    
    SharePoint adds an ID column to every list automatically.
    That ID is the primary key for each record.

    The key to our implementation is the IssueId column in the Actions list. This number column stores the ID of the related issue, creating our parent-child relationship.

    Important notes about SharePoint IDs

    SharePoint automatically creates an ID column for every list:

    • IDs are unique within each list and increment automatically
    • The ID column isn’t shown in the default view, but you can add it
    • IDs aren’t reused, even after items are deleted (similar to database identity columns)
    • IDs are always of type Number, making them efficient for filtering and relationships
    Pro tip
    Call the column IssueId rather than Issue or Parent. A name that says what it holds makes formulas easy to read months later. Set decimal places to 0 and make the column required, so an action can’t be saved without a parent.
  2. 2

    Connect to SharePoint in Power Apps

    Now let’s create a Power App and connect it to our SharePoint lists:

    Add the data source
    // In Power Apps: Data > Add data > SharePoint
    // Connect, then enter your site address:
    https://yourtenant.sharepoint.com/sites/yoursite
    
    // Tick both lists: Issues and Actions

    After connecting, you’ll have access to both the Issues and Actions lists within your app, including all their columns.

    Added a column later?
    Power Apps keeps its own picture of each list’s columns. If you add a column in SharePoint after connecting, refresh the data source from the Data pane, or remove and re-add it. The Refresh function reloads rows, but it may not pick up a new column.
  3. 3

    Build the basic app structure

    Our app needs several screens:

    1. Main screen: shows a gallery of issues
    2. New Issue screen: a form to create a new issue
    3. View Issue screen: shows issue details and related actions
    4. New Action screen: a form to create a new action related to the current issue

    For the main screen, create a gallery connected to the Issues list. Add a plus button to navigate to the New Issue screen, and an edit icon in each item to navigate to the View Issue screen.

    Main screen example

    On your main screen:

    1. Add a gallery connected to the Issues list (Gallery_Issues)
    2. Display the Title and ID in each gallery item
    3. Add a button that navigates to the New Issue screen
    4. Add an icon in each gallery item that navigates to the View Issue screen and selects the current item
    The four screens of the Issues appThe main screen lists issues. The plus button opens the New Issue screen. The edit icon opens the View Issue screen, which shows the actions for that issue. The Add action button opens the New Action screen, and saving returns to the View Issue screen.Main screenLate deliveryID 1Site accessID 2Invoice errorID 3+ New issueNew Issue screenTitleDescriptionSaveCreates the parent recordView Issue screenLate deliveryActions with IssueId = 1Call courierEmail clientAdd actionNew Action screenTitleDescriptionIssueId = 1, set for youSavePlus buttonEdit iconAdd actionAfter Patch
    How the four screens connect. Saving a new action returns you to the issue you came from.
  4. 4

    Create the Issue detail screen

    The Issue detail screen is where the parent-child relationship becomes visible. This screen should show:

    1. The details of the selected issue
    2. A gallery of related actions
    3. A button to add a new action for this issue

    The key is filtering the Actions gallery to show only actions related to the current issue:

    Power Fx: filter the related records
    // Items property of the Actions gallery on the View Issue screen
    Filter(
        Actions,
        IssueId = Gallery_Issues.Selected.ID
    )
    
    // Newest first: sort the filtered results by ID, highest to lowest
    Sort(
        Filter(
            Actions,
            IssueId = Gallery_Issues.Selected.ID
        ),
        ID,
        SortOrder.Descending
    )

    This filter checks the IssueId column in the Actions list and only shows records where it matches the ID of the currently selected issue.

    Pro tip
    Sort by ID rather than adding a date column just for ordering. IDs only ever go up, so highest to lowest gives you newest first without extra work.
  5. 5

    Create related records

    When creating a new action, we need to save both the action details and its relationship to the parent issue:

    Power Fx: save a child record
    // OnSelect of the Save button on the New Action screen
    Patch(
        Actions,
        Defaults(Actions),
        {
            Title: txtActionTitle.Text,
            Description: txtActionDescription.Text,
            IssueId: Gallery_Issues.Selected.ID  // this line creates the relationship
        }
    );
    
    // Then go back to the parent record
    Navigate(ViewIssueScreen, ScreenTransition.Cover)

    This Patch function saves a new record to the Actions list and sets the IssueId field to the ID of the currently selected issue, creating the relationship between them.

    Pro tip
    Reset the form controls after saving, for example Reset(txtActionTitle), so the next action starts with a blank form.

Advanced techniques

Delegation considerations

When working with SharePoint lists in Power Apps, delegation is an important concept to understand. Delegation determines whether operations happen at the data source or in the app.

The good news is that filtering by ID and IssueId (both number fields) is delegable to SharePoint, meaning SharePoint handles the filtering server-side. That helps you get correct results even with large lists.

For best performance:

  • Always filter using delegable operations when possible (=, <, >)
  • Use number fields for relationships, as they’re delegable for these operators
  • Consider using the Sort function to organise your data (sorting on a column such as ID is also delegable)
Check it in your own app
Delegation support can differ between data sources and change between releases. Treat any delegation warning in the formula bar as a to-do item, and re-test after big Power Apps updates.

Creating one-to-many-to-many relationships

You can extend this pattern to create deeper relationships. For example, you could add a Comments list related to Actions, where each action can have multiple comments.

To implement this, you would:

  1. Create a Comments list with an ActionId column
  2. Filter the Comments gallery based on the selected action
  3. When saving a comment, set its ActionId to the selected action’s ID

Each extra level repeats the same three moves, so once you’ve built two levels the third takes minutes.

Cascading deletes

With a plain number column, SharePoint doesn’t support automatic cascading deletes. If you delete a parent record, the related child records remain orphaned.

If cascading deletes are important for your app, you’ll need to implement them manually:

  1. Before deleting a parent record, find all related child records
  2. Delete the child records using Remove() or ForAll() with Remove()
  3. Then delete the parent record
Power Fx: delete children, then the parent
// Delete the child Actions first, then the parent Issue
ForAll(
    Filter(Actions, IssueId = Gallery_Issues.Selected.ID),
    Remove(Actions, ThisRecord)
);
Remove(Issues, Gallery_Issues.Selected)
Lookup columns behave differently
If you use a lookup column instead of a number column, SharePoint can restrict or cascade deletes for you through the column’s relationship settings. Confirm the options available on your site before you rely on them, and test with a copy of your data first.

Real-world application

This pattern can be applied to many real-world scenarios:

  • Project managementProjectsTasks
  • Customer serviceCasesNotes
  • Inventory managementProductsStock levels
  • Event planningEventsAttendees
  • HR processesEmployeesTraining records

The pattern remains the same: create a column in the child list that references the ID of the parent record, then use filtering in Power Apps to show only the related records. We used exactly this structure in our building inspection CRM case study, where enquiries, quotes and follow-ups all sit in connected SharePoint lists.

Limitations and considerations

While this approach works well for many scenarios, it does have some limitations compared to true relational databases:

  • No referential integrity with a number column (orphaned records are possible)
  • No cascading operations (they must be implemented manually)
  • No joins (relationships must be managed through filtering)
  • Performance can degrade with very large lists (more than about 5,000 items), unless the linking column is indexed
  • Complex queries across multiple relationships may hit delegation limits

For complex enterprise applications with many relationships and large data volumes, you might want to consider Dataverse or a SQL Server database instead. Our guide on using Power Apps with a SQL database covers that route.

Best practice for related lists

These four habits turn a working demo into an app you can leave running with real users.

Keep the selected parent in a variable

  1. 1Run Set(varIssue, ThisItem) when the user opens an issue.
  2. 2Use varIssue.ID in your Filter and in your Patch.
  3. 3Every screen now reads one value, whichever screen it’s on.

Check that every save worked

  1. 1Wrap Patch in IfError so a failure doesn’t go unnoticed.
  2. 2Show a Notify message that tells the user what to do next.
  3. 3Only navigate away once the save has succeeded.

Index the linking column

  1. 1Open the Actions list settings in SharePoint.
  2. 2Choose Indexed columns, then create a new index.
  3. 3Pick IssueId. Filters on large lists have a much easier time.

Test with realistic volumes

  1. 1Add a few hundred test rows before you hand the app over.
  2. 2Watch the formula bar for delegation warnings.
  3. 3Fix every warning before real data goes in.

Here’s how the first two habits look together. The icon stores the selected issue in a variable, the gallery and the save button both read it, and the save is wrapped in an error check:

Power Fx: variable plus error handling
// OnSelect of the icon inside the Issues gallery
Set(varIssue, ThisItem);
Navigate(ViewIssueScreen, ScreenTransition.Cover)

// Items of the Actions gallery
Sort(
    Filter(Actions, IssueId = varIssue.ID),
    ID,
    SortOrder.Descending
)

// OnSelect of the Save button
IfError(
    Patch(
        Actions,
        Defaults(Actions),
        {
            Title: txtActionTitle.Text,
            Description: txtActionDescription.Text,
            IssueId: varIssue.ID
        }
    ),
    Notify("The action could not be saved. Please try again.", NotificationType.Error),
    Reset(txtActionTitle);
    Reset(txtActionDescription);
    Navigate(ViewIssueScreen, ScreenTransition.Cover)
)

Common mistakes to avoid

These five come up again and again when we’re asked to repair a Power Apps and SharePoint build.

  1. Linking records by title instead of by ID

    InsteadStore the parent’s ID in a Number column. Titles get edited, retyped and duplicated, and every change breaks the link. An ID never changes.

  2. Filtering in the app instead of in SharePoint

    InsteadUse delegable operations such as equals on a number column, so SharePoint does the filtering and sends back only what the screen needs.

  3. Forgetting to refresh after adding a column

    InsteadRefresh the data source from the Data pane, or remove and re-add it, so Power Apps sees the new column before you reference it.

  4. Deleting a parent and leaving orphans

    InsteadDelete the child records first, then the parent. A number column won’t do this for you, so build it into the delete button.

  5. Reading a gallery’s selection from another screen

    InsteadCopy the selected record into a variable once, then use the variable everywhere. It survives screen changes and is easier to debug.

Before you publish the app

  • The linking column is a Number with 0 decimal places
  • The linking column is required, so no orphan can be saved
  • The linking column is indexed on lists that will grow
  • Every Filter on a list is free of delegation warnings
  • The selected parent is stored in a variable
  • Patch is wrapped in IfError, with a clear message
  • Deleting a parent also removes its children
  • Someone other than the builder has tried to break it

Need a hand with connected Power Apps?

Our developers build and repair Power Apps on SharePoint every week. Tell us what you’re trying to build and we’ll tell you honestly whether lists are enough. We also support Microsoft 365 and SharePoint more broadly.

Talk to our team

Frequently asked questions

Can SharePoint lists really replace a relational database?

For small to medium parent-child data, they can do the job well. You get one-to-many relationships, filtered galleries and connected screens. What you don’t get is enforced integrity, automatic cascades or server-side joins when you use a number column.

If those matter to you, or your data is large, a platform built for relational data is the better home.

Should I use a number column or a lookup column?

A number column is the simplest to build, easiest to read in a formula and delegable for equality filters. A lookup column helps when people also work in the SharePoint list directly, because it can show the parent’s title and SharePoint can apply relationship rules to it.

If you’re unsure, start with the number column and move to a lookup only when you have a reason. Test delegation either way.

Will filtering by IssueId work with thousands of records?

Filtering by equality on a number column is delegable, so SharePoint does the work and Power Apps isn’t limited to the first few hundred or thousand rows it would load locally. On lists that keep growing, index the IssueId column in SharePoint as well.

Delegation rules and list thresholds can change, so check the warning messages in your own app and confirm the current limits in Microsoft’s documentation.

How do I stop orphaned child records?

With a number column, SharePoint won’t stop you deleting a parent that still has children, so the app has to do it. Delete the child records first, then the parent, or hide the delete button until a parent has no children.

With a lookup column, SharePoint can restrict or cascade deletes itself. Check the relationship settings on the column.

When should I move to Dataverse or SQL Server?

Consider it when you need strict integrity, many relationships, very large volumes or complex reporting. Licensing is part of that decision. At the time of writing the SharePoint connector is a standard connector and Dataverse can need different licences, but licensing changes, so confirm it with Microsoft before you commit.

If you’d like an outside opinion, our team can review your Power Apps design and recommend a platform.

Conclusion

SharePoint lists can indeed be used effectively as a relational database for Power Apps. By creating linked lists with appropriate columns to establish relationships, you can build sophisticated multi-table applications without needing additional licences or more complex database platforms.

This approach is perfect for departmental apps, team tools and solutions where simplicity and accessibility are priorities. The ability to create, view and manage related records gives your users a cohesive experience while leveraging the familiar and accessible SharePoint environment.

With these techniques, you can build powerful, data-driven applications that feel like they’re connected to a full relational database, all while staying within the SharePoint and Power Apps ecosystem.

If you’d like to see more Power Apps development tips and techniques, please head over to the YouTube channel and leave a comment there. I actively monitor and respond to all YouTube comments!

About the author

Marcello Brocchi is a lead developer at Office Experts Group, an Australian Microsoft consultancy established in 2000. He specialises in computer science and Power Platform integration, and is the founder of the YouTube channel Chino Does Stuff. If you have any questions, please get in contact using the form below.

Contact Us

Get in touch with our team for general enquiries and support. We're here to help with any questions you might have about our services.

Need to attach a file?

Need pricing for a specific project? Fill out our quote form and we'll provide you with a detailed estimate tailored to your needs.