In the world of enterprise application development, building a simple "Submit" form is only the beginning. Real business processes need collaboration, auditing, and clear state management. A very common requirement is an Action Tracking System.
A supervisor creates a log, a team member updates it, and all notes must be stored historically. Once an action is "Closed", no one should modify it. In this guide, I will show you how to build a Comment and Status Control System in Power Apps.
The Business Scenario
The Action Tracker flow:
- Creation: A record is added in SharePoint.
- Collaboration: While "Open", users can add comments.
- Completion: A user clicks "Close Action".
- Read-Only: After closing, comment & close buttons disable.
App Architecture
- Data Source: SharePoint List:
Action_Tracker_Master - Key Columns:
Status– Open, ClosedComments– multi-lineLogID,LogDate
Step 1: Navigate to Record
Gallery gal_ActionList → OnSelect:
Set(varCurrentAction, ThisItem);
Navigate(scr_ViewAction, ScreenTransition.None);
Step 2: Multi-User Comment System
Displaying Existing Comments
- Mode → Multi-line
- DisplayMode →
DisplayMode.View - Default →
varCurrentAction.Comments
Adding New Comments
txt_AddComment → DisplayMode:
If(
!IsBlank(varCurrentAction) && Text(varCurrentAction.Status.Value) = "Open",
DisplayMode.Edit,
DisplayMode.Disabled
)
Step 3: Save Comment Logic
btn_SaveComment → OnSelect:
If(
!IsBlank(txt_AddComment.Value),
Patch(
Action_Tracker_Master,
varCurrentAction,
{
Comments: Concatenate(
Coalesce(varCurrentAction.Comments, ""),
If(!IsBlank(varCurrentAction.Comments), Char(10) & Char(10)),
User().FullName & " | " &
Text(Now(), "[$-en-US]hh:mm AM/PM | dd-mm-yy") & " : " &
txt_AddComment.Value
)
}
);
Refresh(Action_Tracker_Master);
Set(varCurrentAction, LookUp(Action_Tracker_Master, ID = varCurrentAction.ID));
Reset(txt_AddComment);
Notify("New comment added successfully!", NotificationType.Success),
Notify("Comment is required before submitting.", NotificationType.Error)
)
Step 4: Close Action
Patch(
Action_Tracker_Master,
varCurrentAction,
{ Status: { Value: "Close" } }
);
Notify("Record has been closed.", NotificationType.Success);
Refresh(Action_Tracker_Master);
Navigate(scr_ViewAction, ScreenTransition.None);
Mistakes to Avoid
- Don't hardcode usernames → Use
User().FullName - Reset textbox after submit →
Reset(txt_AddComment)
FAQ
Q: Max characters?
A: SharePoint multi-line column supports up to 63,999 characters.
Conclusion
A comment + status control system makes your app professional and reliable. With Patch and conditional DisplayMode, you ensure data safety.