
When building apps in PowerApps, it’s tempting to store only the name of an item (like Access Item Name) instead of its unique ID. It works at first, but quickly creates long-term problems:
- Duplicate names cause confusion.
- Renaming items breaks existing relationships.
- Deleting items leaves orphaned data behind.
The fix? Bulk updating your SharePoint list to include IDs.
This process, sometimes called retrofitting IDs, ensures your data stays consistent and reliable.
In this article, I’ll walk you through three ways to bulk update your SharePoint list and the best practices you should follow.
Why You Need IDs in PowerApps
- Names aren’t unique - two items can share the same name.
- Names can change - breaking relationships if they’re updated.
- IDs are permanent - always unique and reliable for lookups and filtering.
👉 Best practice: store both ID and Name.
- Use ID for integrity and relationships.
- Use Name for display to users.
Option 1: Bulk Update with a Number Column (Fastest)
The simplest way is to add a Number column called AccessItemID
to your dependent table (e.g., RequestedAccessItems
). Then run this Power Fx formula:
ForAll(
AccessItems As ai,
UpdateIf(
RequestedAccessItems,
AccessItem = ai.Title, // match by name
{ AccessItemID: ai.ID } // update ID
)
)
How it works: This loops through each item in your reference list (AccessItems
) and updates all matching records in your dependent table by setting the AccessItemID
based on the name match.
Option 2: Use a Lookup Column
If you want a true relationship in SharePoint, create a Lookup column in RequestedAccessItems
pointing to AccessItems
. Then bulk update using this formula:
ForAll(
AccessItems As ai,
UpdateIf(
RequestedAccessItems,
AccessItem = ai.Title,
{ AccessItemID: ai.ID } // Lookup column update
)
)
Benefits: SharePoint Lookup columns provide built-in referential integrity and make it easier to manage cascading deletes when removing related items.
Option 3: One-Off Patch Migration
For a one-time migration, you can loop through each record and patch individually.
ForAll(
Filter(RequestedAccessItems, IsBlank(AccessItemID)),
Patch(
RequestedAccessItems,
ThisRecord,
{
AccessItemID: LookUp(AccessItems, Title = ThisRecord.AccessItem, ID)
}
)
)
When to use: This approach is slower for large datasets, but sometimes easier if you only need to run it once and want more granular control over the process.
Best Practices for Bulk Updates in PowerApps
- Always store both ID and Name - ID for integrity, Name for display
- Refresh your data sources after adding new columns, otherwise PowerApps won't "see" them
- Test on a backup collection before running bulk updates on production data
- Handle duplicates carefully - if names aren't unique, use a composite key (Category + Name)
- Use Lookup columns where possible for true referential integrity and easier deletion of related items
- Plan for cascading deletes - with proper ID relationships, you can safely remove parent items and handle dependent records appropriately
If your PowerApps app only stored names in SharePoint lists, don’t worry - you can fix it by bulk updating with IDs. Whether you use a Number column, a Lookup column, or a one-time Patch migration, the key is to build your app on reliable relationships.
Next time you’re designing a table in PowerApps, ask yourself:
👉 Am I storing just the label, or also the unique ID that guarantees data integrity?
Your future self (and your users) will thank you.