[Human Readable Change History] System is capturing the wrong information (attribute)

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

Hi, 

I am using RecordDifferences to record changes made to the form after clicking Save. Now, it is capturing all the fields correctly except for one field, where drop down is used and source is from another entity, it captures the wrong attribute. For example, drop-down is showing the title, so I want to show and record the differences of the title. But it is capturing the change in description - which is another attribute of the same entity.

E.g. Form: Application Form; Fields in Form: Subject, Body, JobTitle(drop-down where source is from JobInfo entity)

 Entity: JobInfo; EntityAttributes: JobTitle, JobDescription

May I get some suggestions and help as to how I can capture the right information?

Thank you!

Hi Rachael,

I haven't used this component, but the behaviour you are experiencing seems to suggest that the dropdown is showing JobTitle (you configured the dropdown's Source Attribute to be JobInfo.JobTitle), but storing the JobDescription (you configured the dropdown's Source Identifier Attribute to be JobInfo.JobDescription)...

Can you confirm? Also, can you confirm what is the Identifier of Entity JobInfo?

Hi There!

Nice component btw, i really like it :p

I have a similar issue like Rachael mentioned.

This is a simplified example of our case:

Original record
_____________

Customer name : CustomerA
Currency: EUR
Seller: Fuji


Changed to:
_____________
Customer name: CustomerA
Currency: EUR
Seller: Remedy



Result returned from the extension:
_____________

Customer name: Remedy
Currency: EUR
Seller: Fuji


Any idea what could be the cause?
The weird thing is, it is working correctly 95% of the time, but sometimes it picks the wrong field :/


Greetings,

Niels

Jorge Martins wrote:

Hi Rachael,

I haven't used this component, but the behaviour you are experiencing seems to suggest that the dropdown is showing JobTitle (you configured the dropdown's Source Attribute to be JobInfo.JobTitle), but storing the JobDescription (you configured the dropdown's Source Identifier Attribute to be JobInfo.JobDescription)...

Can you confirm? Also, can you confirm what is the Identifier of Entity JobInfo?

Hi Jorge, 

Thanks for the reply. Below is a more detailed explanation of the problem I'm facing.


Entity: JobInfo

JobInfo entity attributes: JobTitle, JobDescription

e.g. JobTitle: Software Engineer; JobDescription: I code

e.g. JobTitle: Data Analyst; JobDescription: I analyse data


Application Form:

Subject

Body

Job Title (source attribute: JobInfo.JobTitle)


At creation:

Subject - Job One

Body - Job One's body

Job Title - Software Engineer


After Edit:

Subject - Job One

Body - Job One's body

Job Title - Data Analyst


RecordDifferences is showing:

Job Title changed from 'I code' to 'I analyse data'

when it was supposed to show :

Job Title changed from 'Software Engineer' to 'Data Analyst'


Any update on this?

Solution

Hi Niels,

Did you have a look at the site properties for the DiffEntityDataToText eSpace.
These site properties can be used to control which attribute will be first used, second and third.

If none can be found than the first text attribute is used and after that the first non id attribute will be used.

I hope this helps.

Solution

Thank you very much, i'll take a look at it! Thanks for the answer :)

Hello,

I've passed throw that problem before. 

The problem is related with the fact that the same entity name (in service studio) can't be repeated in other modules (espaces). I think even if those modules have been deleted. So i had to do a custom version of the DiffEntityDataToText module and pass the espaceid (you can use the outsystems built-in function GetOwnerEspaceIdentifier() to get the Module/espace Identifier) where the entity was and then filter the referenced data according.

This problem may only occur with reference attributes and this happens because there are several entities with the same name on the database and he don't know which entity he should retrieve the information so it picks it random. 

Tip: you can debug the DiffEntityData2Text module.

Hope it helps,

Luis

My problem before was related with the id of the module (espaceid) where the entity was, which was causing retrieving incorrect data from the related entity.

I don't have any idea about how the new version is now... I just had similar behavior in the pass. 



Hi Luis,

Thanks for that remark.

Cheers,

Johan