[Human-readable Change History] Reserved word 'Name' seems to be causing an issue

[Human-readable Change History] Reserved word 'Name' seems to be causing an issue

  
Forge Component
(18)
Published on 2015-06-18 by Justin James
18 votes
Published on 2015-06-18 by Justin James
Gents - love this component!  Deployed and finding great value.  One thing I was hoping you might be able to help me with.  I'm attempting to track changes on a two columns that reference the User table.  Note:  I'm in a multi-tenant environment.  

All of my fields diff correctly except the UserID fields.  I get this error:
Error in advanced query GetReferencedRecord_Original_OSSYS in Translation_GetValuesFromReferencedEntity in DiffEntityDataToText (EXEC ('SELECT '+@NameAttribute+'   FROM ossys'+@PhysicalTableName+' WHERE '+@IdAttribute+' = '+@RecordId+'')): Incorrect syntax near 'Name'.

I went into the referenced component and added brackets like this [@NameAttribute]...thinking it would allow me to reference the reserved this way; no such luck.  

Does anyone have any suggestions?  Many thanks in advance.

Ameet

Hi Ameet,

Did you find a solution for this problem?

Best regards,
Ricardo
No.  Unfortunatley not.  Had to simply not track those fields.  Unfortunate.  
Ameet, can show us how the query got after quoting the identifier with brackets (ie: changing to [@NameAttribute])?

Cheers,
Miguel
Hi Ammet and Miguel,

I found a solution to this problem, you just have to remove the "EXEC" function.

In fact, as the parameters are marked with Expanded line = Yes you don't need it.

Fixed Advance Query: 


Best regards,
Ricardo
Argh! I couldn't find this in the Forge to look for answers to this issue... and I found/fixed the same issue that Ricardo posted the fix for!

J.Ja
Hi Justin, maybe you also want to check this one:

http://www.outsystems.com/forums/discussion/5937/record-difference-extension/
Ricardo -

Thanks! I just joined the team on this component, so I can post the patched version. :)

J.Ja
Turns out that the fix also needed to be applied to a few additional queries, a fixed version is being uploaded in a moment...

J.Ja