Column name including Parent for FK in Model Naming Options/Macro Name

Comments

2 comments

  • Avatar
    Tim Woolford-Smith

    Hi TP

    you could do it in the attribute to column name mapping in the Domain

    On the Logical Model, create a domain for your Key - let's call it Identifier and in the Properties of the new Domain there is a place to put the Macro code in Attribute Name (it should already contain a Macro of %AttDomain when you create it - which shows that you will generate an attribute name of Identifier using my suggested name)

    Change the macro code to

    %OwnerEntity %AttDomain

    then, the attribute name in entity XYZ will be called XYZ Identifier and this name will be retained on the FK references

    if (as you imply) you just want the 1st 3 characters of the entity name then change it again to

    %Substr(%OwnerEntity,1,3) %AttDomain

    now if the Entity is called XYZDetails you will still generate XYZ Identifier

    Cheers

    Tim Woolford-Smith

  • Avatar
    TP Wu

    That's cool!!!  %OwnerEntity is actually showing the parent table of a FK column.  Thank you very much.

Please sign in to leave a comment.

Powered by Zendesk