The File Diff Tool is a reusable OutSystems component that compares two text inputs or files and highlights the differences between them. It provides a clear visualization of added, removed, and unchanged content using a structured side-by-side or line-by-line format.
This component is designed to simplify comparison tasks in scenarios such as document validation, code review, audit tracking, and data verification.
Compare two text inputs or uploaded files
Line-by-line difference detection
Side-by-side comparison view
Highlight changes (added, removed, unchanged)
Supports large text inputs
Export comparison results (optional extension)
Easily reusable across applications
Input text or files are provided by the user
Files are converted from binary to text format
Text inputs are passed to a JavaScript diff engine
Differences are computed using a line-based algorithm
Results are returned as JSON
JSON is deserialized into a DiffLine list
The UI renders results with visual highlights
Upload or input two text sources
Call the CompareText or CompareFiles action
Receive JSON diff result
Deserialize into DiffLine list
Bind the list to a Table or List widget
Apply conditional styling for visualization
Bind the DiffLine list to a table or list widget:
Left column → LeftText
Right column → RightText
Status column → Type
Dependencies
JavaScript library: diff-match-patch (browser version)
OutSystems JSON utilities
Document comparison
Code review tools
Data validation
Audit and compliance tracking
Fraud detection scenarios
The File Diff Tool provides a reliable and reusable way to detect and visualize differences between text or files, improving accuracy and efficiency in comparison-heavy workflows.