Editing a Data File

Navigation:  How to Work with Data Files >

Editing a Data File

Previous pageReturn to chapter overviewNext page

 

Overview

 

If required by the project, data files can be edited during the development of a project.

 

 

To Edit a Data File

 

Step-by-step

 

1. Use one of the following to open a data file's properties window:

 

a. Go to the "Data Files" module and select the data file you want to edit.

 

b. Right-click the selected data file.

 

 

c. Select "Edit".

 

OR

 

a. Click , wherever available (usually in the properties windows of data file related processes).

 

Either of these options opens a data file's properties window where you can edit the settings of the data file in question. It is the same window displayed when creating a data file.

 

 

2. Maintain/alter the options presented in the "General" tab according to project requirements.

 

File Settings

File Alias

Maintain or modify the file alias (internal MCL-Designer reference name).

 

Do NOT use special characters when defining an alias.

 

Remember that the data file alias can only have up to 10 characters.

Physical File Name

Maintain or modify the file name.

 

Do NOT use special characters. A file name should only contain alphabetic characters, numbers, and the underscore “_” character (the underscore character is commonly, used to indicate a space).

For more detailed information, register/log in to our MCL Community and access MCL's Knowledge Base ("File Name Best Practices").

Type

Maintain or modify file type (Lookup; Capture or Print).

Sort on

Maintain or modify the sorting field.

If you select an option with sorting fields, the "File Data Viewer" window will provide an extra option to sort the existing data.

Field Separator

Maintain or modify the field separator.

Record Separator

Maintain or modify the characters that separate records.

Advanced Settings

Location

Maintain or modify the data file's location within the device.

 

When selecting the location for the data file consider the target device. Ex: “temp (non persistent)” is NOT an option if the target device does not have a RAM partition (or an equivalent partition such as "cache disk") because the device will end up storing the data files into the default folder for data files (<DATA> alias.

 

We recommend selecting "Default", if the data file is ONLY going to be accessed by the MCL application (and its background procedures). If the data file is to be shared with 3rd party applications, choose "Shared".

 

Encoding

Maintain or modify the file format.

 

A data file with a "UTF-8 Without BOM" format does not support the customization of its fields in terms of length and fillers. If you modify the file format to this one, access the field's properties window and check and check what has been defined in terms of size and fillers - it CANNOT have a defined length and fillers. You must check the "Variable Length" option instead.

 

When selecting the charset/encoding, consider the characters used in the data file or database in question – some special characters may NOT be displayed if the wrong charset/encoding is defined.

Ex: The Hindu character “अ” (included in a data file in use) can only be viewed with a “UTF 8” or “UTF-16 without BOM” encoding.

 

The recommended codification for Android developed projects is "UTF-8 Without BOM" (or "UTF-16 Without BOM" if you require the data file's field to have a fixed length and fillers).

 

Mode

Maintain or modify the file mode ("Default"; "Optimized"; "Auto Commit" or "Shared").

 

3. If you are done with the editing, click .

If you require the editing of the field settings, open the "Design" tab (continue to step 4).

 

 

4. Use one of the following to open a window that relates to the selected data file field's properties:

 

a. Select the data file field to be changed and click .

 

OR

 

b. Double-click the required data file field.

 

OR

 

c. Right-click the data file field you want to edit and select "Edit Field..." in the resulting menu.

 

 

Once the field's properties window is open, you can enter the necessary changes regarding field settings.

 

 

5. Maintain or edit the available fields as necessary.

 

General Properties

File Name

This option is NOT editable. To do so, return to the "General" tab and edit the "File Alias" and "Physical File Name" options.

Field Name

Maintain or enter a new field name.

Field Size & Filler

Variable Length

Maintain or check the other available option:

 

Check"Variable Length" to allow the fields to have a variable size.

Check "Fixed Length" if you want the fields to have a defined size. In this case, specify the number of characters and fillers allowed in the field and check/uncheck "Remove Filler on read" as required.

 

If the data file has no defined record separator, make sure the "Fixed Length" is checked - no record separator requires you to set a character length.

 

 

If your data file has a "UTF-8 Without BOM" file format (defined in the "Encoding" option - "General" tab of the data file's properties window), you MUST check "Variable Length". The "Fixed Length" option does NOT apply to data files with a "UTF-8 Without BOM" format.

 

Fixed Length

Field Type

String

Check/uncheck the option to alter the field type.

Numerical

Check/uncheck the option to alter the field type. If checked, define the number of decimals and decimal separator characters.

Other Info

Default Value

Maintain or modify the field's "Default Value"

Comment

Maintain or add notes.

 

6. Conclude the editing operation by clicking .

 

 

Use the editing bar to the right of the "Design" tab to add (); edit (); delete () and move () the data file fields.

 

OR

 

Right-click the field you want to modify and select the appropriate option.

 

Delete Field...

Deletes the selected field.

Edit Field ...

Opens the selected field's “Edit a Field of a Data File” window.

Copy Field...

Copies the selected field. Conclude by clicking "Paste Field...".

Paste Field...

Must be preceded by a "Copy Field". Pastes the copied field.

Duplicate Field...

Duplicates the selected field.