Variables for References and Reference Columns

PowerDesigner can use variables in the generation and reverse-engineering of references and reference columns.

The following variables are available for references:

Variable

Comment

%REFR%

Generated code of reference

%PARENT%

Generated code of parent table

%PNAME%

Name of parent table

%PCODE%

Code of parent table

%PQUALIFIER%

Qualifier of parent table. See also QUALIFIER.

%CHILD%

Generated code of child table

%CNAME%

Name of child table

%CCODE%

Code of child table

%CQUALIFIER%

Qualifier of child table. See also QUALIFIER.

%REFRNAME%

Reference name

%REFRCODE%

Reference code

%FKCONSTRAINT%

Foreign key (reference) constraint name

%PKCONSTRAINT%

Constraint name of primary key used to reference object

%CKEYCOLUMNS%

List of parent key columns. Ex: C1, C2, C3

%FKEYCOLUMNS%

List of child foreign key columns. Ex: C1, C2, C3

%UPDCONST%

Contains Update declarative constraint keywords "restrict", "cascade", "set null" or "set default"

%DELCONST%

Contains Delete declarative constraint keywords "restrict", "cascade", "set null" or "set default"

%MINCARD%

Minimum cardinality

%MAXCARD%

Maximum cardinality

%POWNER%

Parent table owner name

%COWNER%

Child table owner name

%CHCKONCMMT%

TRUE when check on commit is selected on Reference (ASA 6.0 specific)

%REFRNO%

Reference number in child table collection of references

%JOINS%

References joins.

The following variables are available for reference columns:

Variable

Comment

%CKEYCOLUMN%

Generated code of parent table column (primary key)

%FKEYCOLUMN%

Generated code of child table column (foreign key)

%PK%

Generated code of primary key column

%PKNAME%

Primary key column name

%FK%

Generated code of foreign key column

%FKNAME%

Foreign key column name

%AK%

Alternate key column code (same as PK)

%AKNAME%

Alternate key column name (same as PKNAME)

%COLTYPE%

Primary key column data type

%COLTYPENOOWNER%

Primary column owner

%DEFAULT%

Foreign key column default value

%HOSTCOLTYPE%

Primary key column data type used in procedure declaration. For example: without length