This component was used in an application I'm working in and I'll noticed that the change history (audit) that was being used wasn't correct for foreign key attributes.
After quite some debugging I'll found out that the action 'Translation_BuildChangedString_Record' gets the entity by name and then the entity attribute by the name of Enity and Entity attribute, which would work if you'll don't have that same entity and attribute in the environment it could end up with retrieving the wrong entity and attribute and with that create an audit with the wrong values.
Example if you'll have 2 modules:Module 1 with Entity 'Gender', attribute Id, Name. Values: Id.1, Name.Female, Id.2, Name.MaleModule 2 with Entity 'Gender', attribute Id, Name. Id.1, Name.Male Id.2, Name.Female,
So if you'll use this logic with module 1 it could be that when gender is set as Female the audit finds the Gender entity from module 2 where the audit shows 'Male'
As always, don't have the time to fix this in the component, will make a clone and specify the entities I'll need but I wanted to make this aware for the community.
@Evert van der Zalm : Would filtering by Espace_Id in the GetEntity and GetEntityAttributes aggregates solve the issue?