You are here: Function Reference > Alphabetical Listing > C > CompressFlds

CompressFlds

Use this function/procedure to compress blank space by moving field data. This function moves field data from one field to a prior named field to compress the space between the fields. Typically you use this function to compress vertical space, as in address lines, but the fields do not have to be vertical relative to each other. You can compress any field.

Note The data moves between the fields; the actual location of each physical field remains the same.

CompressFlds can be used as a procedure or as a function.

Syntax

CompressFlds (FieldList, Section, Form, Group)

Parameter

Description

FieldList

Enter a list of the fields you want to compress, separated by commas. Here is an example:

"FIELD1, FIELD2, FIELD3"

Section

(Optional) Enter the name of a section that contains the fields you specified. The default is the current section.

Form

(Optional) Enter the name of a form that contains the section and/or field you specified. The default is the current form.

Group

(Optional) Enter the name of the form group that contains the form, section, or fields. The default is the current group.

Note When using this function in Documaker Server processing, make sure the fields exist on the section. Some implementations that use versions of the system prior to version 11.0 do not load FAP files in all cases, and fields will not be created when data mapping did not place any data into the field.

Keep in mind...

Example

For this example, assume the following fields and data:

This field

Contains

FIELD_A

ABCDEFG

FIELD_B

is empty

FIELD_C

is empty

FIELD_D

TUVWXYZ

Assume your field list looks like this:

"FIELD_A, FIELD_B, FIELD_C, FIELD_D"

FIELD_A does not move because there is no field named before it.

FIELD_B and FIELD_C are empty; therefore, the data from FIELD_D moves into FIELD_B, which is the first available empty field.

The result looks like this:

This field

Contains

FIELD_A

ABCDEFG

FIELD_B

TUVWXYZ

FIELD_C

is empty

FIELD_D

is empty

If you had specified the field list parameter had been specified like this:

"FIELD_D, FIELD_C, FIELD_B, FIELD_A"

The result would be as follows:

This field

Contains

FIELD_A

is empty

FIELD_B

is empty

FIELD_C

ABCDEFG

FIELD_D

TUVWXYZ

See also