Previous Topic: %UpperNext Topic: Macro Variables


Macro Syntax

The CA ERwin DM macro syntax commands are composed of keywords, punctuation, and parameters.

Syntax Example

Expansion

%ForEachAttribute() {
%If{
%ColIsFK}
%AttName
}

master-number
movie-copy-number

Here is an example of syntax at work using the %ChildAtts macro:

%ChildAtts

Lists all the attributes of the child entity in a relationship and performs the specified action on each one.

Full Syntax

%ChildAtts(<separator>,<action>, <prefix>)

Full Syntax Example

/*If the current relationship is <is in stock as>, then */

%ChildAtts(" or ",update)

Expansion

update(movie_copy_number) or

update(master_number) or

Usage

Relationship macro-can be used in RI or Rel Override.

The following provides a graphical display of the example:

macrosoverview1