Skip to content

File Dataview - Fields Tab - Flat File Definitions ​

All Records and Fields for a Flat File are entered manually.

The Fields tab window is split into two panes. The upper display pane Fields shows the fields as they are created, while the fields themselves are created in the lower pane, Field Details.

image-20240408-023146.png

Click either the Add Field button or Add In-Memory Field button to add a field.

When all fields have been added as required, click on OK to Save and return to the designer canvas.

Field Details Buttons ​

Button NameDescription
Field Details Add FieldClick the Add Field icon to create a field. Once this button icon has been activated, the fields in the lower pane are able to be populated.
image-20240430-003326.png
Save ChangesClick to Save the field and display the details in the upper pane.
image-20240430-003401.png
Add In-Memory FieldClick to Add In-Memory Field. These fields are additional fields that are available in memory only while the dataview is active. As soon as the dataview is closed, these temporary fields no longer exist.
image-20240430-003438.png
Cancel ChangesClick to Cancel the current field input mode, and no not save any changes.
image-20240430-003515.png

Fields ​

Field NameDescription
Field Details Field NameThe Name of the field. A space in the Name is automatically interpreted as an underscore ( _ ).
Data TypeSelect a data type for the field from the drop-down list, such as string or integer.
Field SizeThe maximum size of the field. This will only appear and be available in certain circumstances.
Display FormatThis field is dependent on the Data Type selected. It will not be available for string or Largeint fields.
Default ValueEnter the value to be used as a default for the field.
Fields In-MemoryThe default for fields entered manually is False.
However, this displays as True if the field has been created by clicking the Add In-Memory Field button.

Buttons ​

Button NameDescription
OKClick to save any changes you have made. All changes will be lost if you do not click the OK button.
CancelClick to Cancel any changes you have made.

INFO

If you have specified a Record ID on the Records tab, then the first field to be created is one to accommodate this Record ID value.

It does not matter what you call it - in this example for the dataview NEIGHBOURS, the field is called IDENTIFIER, but could be given any name that makes it relevant to you.

As the Record ID on the Records tab was the value X, this has also been entered as the Default Value for this field, as shown below.

image-20240429-223402.png

For the next dataview called FRIENDS, where the Record ID on the Records tab was the value B, this has also been entered as the Default Value for the IDENTIFIER field for this dataview, as shown below.

image-20240429-224239.png

In the Flat File, the fields are separated and identifed as illustrated below - showing the IDENTIFIER as the first item on each line.

The lines in the Flat File follow a hierarchy - the B line records belong solely to the X header record above it, regardless of what may be on the line.

image-20240429-224916.png

In the following examples, eight (8) fields have been created for the NEIGHBOURS record.

WARNING

For fields with a Boolean data type, the Display Format field will default to 0;1. As the first value is taken for True, this means that a True value will return a zero (0) and not a one (1).

So in this example, for the field XMAS_BBQ, a True value will return zero (0). The field default is negative.

But a True value for the field PET?, will return a Y. The field default is negative.

And a True value for the field ANY_CHILDREN will result in a returned value of sixty (60). A False will return everything to the right of the first semi-colon ( ; ) - the value 45;88.73 WHATEVER.

image-20240410-230217.png

To edit an existing field, click on the field and the details will populate the lower pane. Change the details as required and click Save to re-save the record with your changes. To discard any changes, select Cancel.

New fields will automatically be appended to the bottom of the Fields list. While Statelake does not care what order the fields are in, you may want to change the order to make the list easier to read or follow. To change this order, click on the field to be moved, such as NUM_KIDS in the example below.

image-20240415-221857.png

Once the field has been highlighted, click either of the up and down arrows shown on the right margin to move your selected field.

image-20240415-222548.png

NUM_KIDS before moving

image-20240415-222639.png

NUM_KIDS after moving