Example - Dynamic Expression to Construct a Dynamic Struct
Example - Dynamic Expression to Construct a Dynamic Struct
An Expression transformation has a dynamic port from which you want to construct a struct.
An Expression transformation has the following generated input ports:
Name String
Street String
City String
State String
Zip Integer
The transformation contains a dynamic complex output port called d_structAddress. You want to construct a struct and return the result to d_structAddress.
You create a port selector AddressPS and define the selection rules to include the following ports by name:
Street String
City String
State String
Zip Integer
Then, you create a dynamic expression with the STRUCT function.
The following image shows a dynamic expression that references a port selector AddressPS:
In the
Output Port Settings
area, specify the port selector AddressPS as the base port.
The dynamic expression creates the following struct with the elements from the port selector:
d_structAddress{
Street String
City String
State String
Zip Integer
}