[Human Readable Change History] Human Readable Change History - Help in senteces based on the meta model id's

Forge Component
(23)
Published on 8 Apr by Johan den Ouden
23 votes
Published on 8 Apr by Johan den Ouden

I have a Person entity related to a Country entity in my application and instead of showing the Country description it shows the Country id in the audit log. example:


"CountryId changed from 5 to 7" and I would like it to show "Country changed from Brazil to Portugal". Where am I going wrong?


The rest of it all works, except for this id translation for country description. In other words, in my case the part below the component documentation is not working:


"The novelty is the fact of the component create human readable sit on the meta model id's in entities to specific labels.


Ex: instead of "Country Changed from 3 to 4" -> "Country changed from Portugal to Spain" "


My Person entity has the Name, Age, and CountryId fields and my Country entity has the Id and Description fields. When using the component, set the EntityNameToTranslate = "Person, Country" and Locale "pt-pT". I left the EntityLabelsList blank, is this the problem?


I believe that the OriginalRecord and ChangedRecord parameters are correct because the changes are being logged correctly. Only this translation of the id to the corresponding description in the case of related entities is not working.


I'm using outsystems service studio in version 11.0.530.0

You should be able to do join in the aggregate between your base record and the entity that contains the country names. This will give you a record that contains the actual country name and not just the id, you can even remove the fields you don't want to display in the aggregate or the component.



Hi Rafael,

I've never used this component, but this bit of the documentation caught my attention:

As it uses the entity and structure attribute label property, be sure to define them correctly in Service Studio.

In Service Studio, if you double-click on an entity, you can provide some meta-information that the platform stores, namely which of its attributes should the platform consider its Label Attribute:

John Williams wrote:

You should be able to do join in the aggregate between your base record and the entity that contains the country names. This will give you a record that contains the actual country name and not just the id, you can even remove the fields you don't want to display in the aggregate or the component.


In editing a record my aggregate already brings the name and id but it does not work



Jorge Martins wrote:

Hi Rafael,

I've never used this component, but this bit of the documentation caught my attention:

As it uses the entity and structure attribute label property, be sure to define them correctly in Service Studio.

In Service Studio, if you double-click on an entity, you can provide some meta-information that the platform stores, namely which of its attributes should the platform consider its Label Attribute:


I updated the label atributte as per your suggestion but continue unsuccessfully to display the name. my log shows only the id. Has anyone been able to successfully use this component for related entities?