Introduction
In multi-user applications, one of the biggest challenges is preventing data conflicts. What happens if two users edit the same record at the same time? Who wins? Which data should be saved?
To solve this problem, Power Apps relies on a powerful mechanism called Entity Tag (ETag). Although developers rarely see it directly, ETag plays a critical role in maintaining data accuracy and consistency.
This article explains ETag in Power Apps from concept to implementation, with practical relevance for real-world projects.
What is an Entity Tag (ETag)?
An Entity Tag (ETag) is a unique version identifier attached to a record in a data source. It represents the current state of that record. Whenever a record is updated, its ETag changes automatically.
In simple terms:
ETag is a version stamp that tells Power Apps whether a record has changed since it was last read.
Why ETag is Important in Power Apps
Power Apps is often used in enterprise environments where:
Multiple users access the same data
Data is edited simultaneously
High data accuracy is required
ETag ensures
It supports Optimistic Concurrency Control, assuming conflicts are rare but verifying before saving.
How ETag Works in Power Apps
Behind the Scenes Flow
User opens a record
Power Apps fetches:
User edits data
Another user modifies the same record → ETag changes
Original user tries to save → Power Apps compares stored ETag with current ETag
If they don’t match → Power Apps blocks the update and raises a conflict.
ETag & Concurrency Control
Power Apps uses Optimistic Concurrency by default:
| Step | Action |
|---|
| Read | Record + ETag captured |
| Modify | User changes data |
| Save | ETag compared |
| Mismatch | Save fails |
This protects your system from silent data loss.
Data Sources That Use ETag
ETag is actively used in:
| Data Source | Concurrency Mechanism |
|---|
| SharePoint | ETag-based version control |
| Dataverse | RowVersion (ETag equivalent) |
| SQL Server | Timestamp / RowVersion |
| CDS | Version-based concurrency |
Example Scenario
Two managers edit the same approval record.
ETag ensures
Example in Power Apps
IfError(
Patch(Tasks, ThisItem, { Status: "Completed" }),
Notify("This record was modified by another user. Please refresh and try again.", NotificationType.Error)
)
The error occurs because ETag comparison failed.
Can Developers Access ETag?
Power Apps handles ETag internally:
Common ETag Error Messages
"The record has been modified by another user."
"The data source has changed since the record was retrieved."
"Concurrency conflict detected."
Best Practices to Handle ETag Conflicts
1. Always Handle Errors
IfError(
SubmitForm(EditForm1),
Notify("Data conflict detected. Please reload and try again.", NotificationType.Warning)
)
2. Refresh Before Save
Refresh(DataSource);
SubmitForm(EditForm1);
3. Implement Record Locking (Soft Lock)
Add fields:
Patch(List, ThisItem,
{
IsLocked: true,
LockedBy: User().Email
});
ETag vs RowVersion
| ETag | RowVersion |
|---|
| Logical version ID | Database-level version |
| Used in SharePoint & APIs | Used in SQL Server |
| HTTP header-based | Column-based |
Both serve the same purpose: record version control.
Practical Impact in Power Apps
ETag ensures:
Reliable approval workflows
Secure transactional operations
Conflict-free collaborative editing
Enterprise-grade data handling
Without ETag, Power Apps would risk:
Summary
Entity Tag (ETag) in Power Apps
Is a hidden version identifier for records
Enables optimistic concurrency control
Prevents accidental data overwrite
Ensures safe multi-user collaboration
It operates silently but forms the backbone of secure and reliable data management.
Final Thought
Understanding ETag allows Power Apps developers to build robust, conflict-free, and scalable applications. While invisible, its effect is felt every time multiple users interact with shared data.