Accessing Data Records and Fields

This section describes the way how the record fields should be worked with. As you know, each component may have ports. Both input and output ports are numbered starting from 0.

Metadata of connected edges must be identified by their names. Different metadata must have different names.

Working with Records and Variables

[Important]Important

Since v. 3.2, the syntax has changed to:

$in.portID.fieldID and $out.portID.fieldID

e.g. $in.0.* = $out.0.*;

That way, you can clearly distinguish input and output metadata.

Transformations you have written before will be compatible with the old syntax.

Now we suppose that Customers is the ID of metadata, their name is customers, and their third field (field 2) is firstname.

Following expressions represent the value of the third field (field 2) of the specified metadata:

You can also define records in CTL code. Such defitions can look like these:

Mapping of records to variables looks like this:

Mapping of variables to records can look like this:

[Important]Important

Remember that if component has single input port or single output port, you can use the syntax as follows:

$firstname

Generally, the syntax is:

$<field name>

[Important]Important

You can assign input to an internal CTL record using following syntax:

MyCTLRecord.* = $0.*;

Also, you can map values of an internal record to the output using following syntax:

$0.* = MyCTLRecord.*;