[ObjectDiff] Option to display attribute 'Label' instead of 'Name'
Forge component by Stuart Harris
Application Type
Reactive

Hi Stuart,

Thanks for sharing this amazing module.
We have a use case to show the attribute 'Label' instead of 'Name'. Due to naming convention sometimes the attribute name is not that user friendly.

Do you consider to include an option to use attribute's label name in future release?
Thanks.

Regards,
Soon

Hi Soon,

Thank you for your message and your kind words.

I am confused by the question because the attribute Label is actually used to identify the label.  Is there something I am missing?

You can try the demo app here Home (shkiandra.outsystemscloud.com) 

Kind regards,

Stuart

Hi Stuart,

Thanks for your reply. The demo result is something I am look for.

For example "Is Active" I believe it is coming from Attribute Label field instead of Attribute Name since it is with space.


I was trying to download the demo from forge unfortunately it is an empty application. Can you please share a copy of working demo? Thanks!

Following is the "Label" field I refer to. In table Entity_Attr it is referring to Default_Label column. Basically what i am looking for is to have option to return "Label" value in the comparison result instead of just "Name". 


Thanks.

Regards,
Soon

Hi Soon,

The demo is available from the forge when you select download component and demo

Using CompareObjectsConfig should give you the results you are looking for


ObjectDiffDemo1.0.0O11.oap

Hi Stuart,

Thanks for you response. Yeah I have downloaded the demo from the Forget and using the one you have attached. Some how I cannot open the OAP file and it has error. 

Anyway I have unzip the OAP file and get the OML to deploy.

I found the result is different from your demo  at Home (shkiandra.outsystemscloud.com)   

For the attribute name I can see it is showing "IsActive" instead of "Is Active" from your demo at Home (shkiandra.outsystemscloud.com)  .


Regards,
Soon

Ok, thanks Soon!

My apologies, maybe I have updated it after uploading the last version.  Thanks for identifying the problem.

I am currently having a problem accessing my personal environment so will upload a new version once that is resolved.

I hope this helps!

Kind regards,

Stuart

Thanks! 

By the way I found an error being thrown from "GetLabelForEntityValue" server action under "GetValues" step. I have check the table name and it has no issue. One thing to call out is my environment is having 5 databases (on-prem). But I have installed this module within same database for the static entity table having error. 

Hope your latest version will resolve this issue too. I am studying your code to find out how this dynamic SQL is working and it could be useful for my other projects. 

Thanks again!

Regards,
Soon

Thanks Soon,

Would you be able to let me know what the correct table name is for that entity and what type of database you are using?

Kind regards,

Stuart

Hi Stuart,

I found this error in Service Center. The table name being constructed is correct and I can use the same the table name SQL Studio. We are in SQL Server 2016.

[2] Error in advanced query GetValue in GetLabelForEntityValue in Gravity_ObjectDiffLib (SELECT @AttributeName  FROM OSUSR@TableName  WHERE Id = @RecordId): Invalid object name 'OSUSR_gq9_RatePlanBillingSystem'.

The only call out is the table is in another database catalog called "fuxxel" instead of main database catalog "outsystems". Would this make a different? 

From the query it does not include any logical database I am assuming it will refer to main db catalog (outsystems)? I will try to do a test to another static entity table locate in main db catalog to find out whether will hit same error.


Regards,
Soon

Hi Soon,

Thank you that information is incredibly helpful!

Yes, the database catalog would explain why the SQL is failing.

I will investigate and see if I can make it work with the different catalog.

Kind regards,

Stuart

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.