Step 2. Add User-Defined Fields that Demonstrate the Normalization of an Array
Step 2. Add User-Defined Fields that Demonstrate the Normalization of an Array
In this step, you add user-defined fields that invoke PowerExchange functions that demonstrate the normalization an array with multiple occurrences.
The user-defined fields invoke the PowerExchange GenVRowKey and GetSeqWithinLevel functions. These functions add data to the database row test output that demonstrate how the table properties that you defined normalize the array. When you run a database row test, PowerExchange displays one row for each occurrence in the array. For more information about these functions, see
GenVRowKey and
GetSeqWithinLevel.
Open the demo.map2array data map and the RECORD_IN record.
In the
Record
window, click the
Expr(0)
tab.
Right-click anywhere on the
Expr(0)
tab and click
Add Field at End
.
In the cell in the
Name
column, enter
r1genvrow_idx
.
In the cell in the
Type
column, select
NUM32U
.
In the cell in the
Phase
column, select
R
.
This selection indicates a read operation.
To enter an expression for the field, click in the cell in the
Expression
column and click the Browse button.
The
Expression Editor
dialog box appears.
In the
Function List
list in the
Expression Editor
dialog box, double-click the GenVRowKey function.
In the
Expression List
list, enter
()
at the end of the GenVRowKey function name. Click
Validate
.
In the
Validate
box, the
No Errors
message appears.
Click
OK
.
Right-click anywhere on the
Expr(0)
tab and click
Add Field at End
.
In the cell in the
Name
column, enter
r1genseq
.
In the cell in the
Type
column, select
NUM32
.
In the cell in the
Phase
column, select
R
.
This selection indicates a read operation.
To enter an expression for the field, click in the cell in the
Expression
column and click the Browse button.
The
Expression Editor
dialog box appears.
In the
Function List
list in the
Expression Editor
dialog box, double-click the GetSeqWithinLevel function.
In the
Expression List
list, enter
()
at the end of the GetSeqWithinLevel function name. Click