Solution
Yes. it is doable by making use of macros, not only for Indexes, but Tables, Columns, Relationships (FK Constraint) as well. Go to Tools | Model Naming Options. Under the Name Mapping tab you will see that there is a Key Group to Index rule. Editing the macro in the key group to index field will allow you to modify the macros as desired.
Here is an example to modify the Index names to use the Index names for each type of Indexes (there are four types (PK, IF, AK and IE).
%Switch(%Substr(%KeyType,1,2))
{
%Choose(PK){PK_%TableName}
%Choose(IF) {%Substr(%KeyType,2,1)K%Substr(%KeyType,3,1)_%TableName}
%Choose(AK){%Substr(%KeyType,2,1)K%Substr(%KeyType,3,1)_%TableName}
%Choose(IE){%Substr(%KeyType,2,1)K%Substr(%KeyType,3,1)_%TableName}
}
This will create an Index name as following:
For PKs -- PK_[Table_Name]
For FKS -- FK[counter]_[Table_Name]
For AKs -- AK[counter]_[Table_Name]
For IEs -- EK[counter]_[Table_Name]
Note: This is just an example and one can be quite creative with setting their naming conventions not only for Indexes, but for Tables, Columns, Domains, Relationships (FK Constraints) by editing the macros in the fields as shown in the screen shot above..
Comments
0 comments
Please sign in to leave a comment.