objectdiff
Service icon

ObjectDiff

Stable version 1.0.6 (Compatible with OutSystems 11)
Uploaded
 on 30 May 2023
 by 
5.0
 (3 ratings)
objectdiff

ObjectDiff

Details
This component compares the differences in objects of the same type. It is intended for use in auditing. It handles differences for the create, update and delete of entities. There are multiple actions available to return the differences between entities in text, HTML or in a structure where you may programmatically use the differences. HTML is generated using EncodeHtml to prevent injection attacks. Translations are available in English, Spanish, French, Japanese, Malay, Portuguese, Russian, Chinese. Let me know if there is another translation you would like. Translation files are also welcome. Foreign key attributes are formatted using the "Label" attribute of the foreign entity as well as the ID.
Read more

Compare two objects of the same entity type and return the differences.

There are different versions of actions with method signatures to suit different scenarios.

Translations are available in English, Spanish, French, Japanese, Malay, Portuguese, Russian, Chinese.

The currency symbol, decimal symbol, group symbol and null placeholder can be overridden via site properties or per call to an action.

The simplest usage is to just call CompareObjectsToText, or CompareObjectsToHtml. These will compare the objects and return Text or HTML identifying the difference between the passed in objects.

For the creation of an object, pass in NullObject() for the OldObject. For the deletion of an object, pass in NullObject() for the NewObject.

The CompareObjects action returns the differences in a structure that can be used programmatically.

The ComparisonResultToText action converts the comparison returned by CompareObjects to text. It is intened this is used for human readable audit records.

The ComparisonResultToHtml action converts the comparison returned by CompareObjects to HTML. It is intended this is used for human readable audit records. Values are HTML encoded to guard against injection attacks.

The "Config" actions provide additional configuration options. Site properties are also available to override default configuration settings for NullPlaceholder, CurrencySymbol, DecimalSeparator and GroupSeparator. FormatOverrides allow a .NET format specifier to control how an attribute is formatted in the output.

Users of the library can also write their own formatting actions and just use the CompareObjects action.

Note on foreign keys:

Values for foreign keys use the "Label" attribute of the foreign entity as well as displaying the id. If the label attribute of a foreign entity is a foreign key, the library will display the value for the second foreign entity, if a Label attribute is defined for it. The id value for the foreign key entity is also displayed.

Release notes (1.0.6)

This release includes the ability to convert date/time value to local time when rendering to text.

To enable conversion to local time, set the LocalTimeZoneId site property. eg AUS Eastern Standard Time

List timezone names with TZUTIL.EXE /L on Windows.

License (1.0.6)
Reviews (2)
by 
2024-01-18
in version 1.0.6
This component is a lifesaver for our OutSystems application, filling the crucial gap in record tracking where OutSystems lacks a built-in solution. It's user-friendly, and seamlessly integrated into our system for effortless monitoring of changes across all entities.

Kudos to the development team for their hard work in creating this invaluable tool. It's a game-changer that has become an essential asset for our team. Highly recommended for anyone facing similar challenges in their OutSystems application. Great job!
Answer from the owner
2024-01-18
in version 1.0.6
Thanks Andre!
by 
2023-03-24
in version 1.0.5
Nicely documented and also nice try now functionality.
Team
Other assets in this category