Example: Importing a profile for a record layout
You can use an import profile to create a record layout from a simple schema specification.
The following specification (spreadsheet) is used:
Schemaname | Financial | |||
Fieldname | Fieldtype | Is Required | Length | |
customerData | ||||
nameLast | String | man | 22 | |
nameFirst | String | man | 16 | |
accountData | ||||
acctNum | String | man | 12 | |
acctType | String | man | 12 | |
acctBal | Double | man | 10 | |
transactionData | ||||
transID | String | man | 9 | |
transDate | Date | man | 8 | |
transAmount | Double | man | 10 | |
transType | Double | man | 3 |
And the following rules are applied:
The rules that are shown take the following actions on the content of the spreadsheet:
- The content of the cell found to the right of "Schemaname" is used as the name of the new layout.
- The column that contains the "Fieldname" cell is specified as containing the "Name" fields the layout.
- The column that contains the "Fieldtype" cell is specified as containing the "Type" fields the layout.
- The column that contains the "Is Required" cell is specified as containing the "Inclusion" fields the layout.
- The column that contains the "Length" cell is specified as containing the "Length" fields the layout.
- The Row Content = ^([^\t]+) matches the first column and create record groupings that use the matched text (three found).
- Every row in the spreadsheet that is used to create a field in the layout contains "man" in the "Is Required" column. This field is used to designate that the column mapping rules are to be run on every row that contains "man" in that column.
The resulting layout, created according to the import profile and selected spreadsheet, is shown: