PDF version of this page

Objects - Text

Text objects are the most complex in FTForm8. Create by selecting something close from the Toolbox and dragging it onto the layout. These samples are in Toolbox:

  • Short Text left aligned single text item.
  • Long Text, left aligned, line-wrapped. You can Copy and Paste long texts in from Word or key in directly.
  • (The next three use "pages printed" as the data source field, and have thousand separator , (comma) and decimal separator . (full stop) and are set for US English as the locale.)
  • Colon-aligned, right at the colon (following title) with left aligned bold data. Example text is "Page:   1".
  • Currency for money amounts, is leading $, right aligned at decimal (separator), comma as thousands separator, sign trailing, zero shown as $0.00.
  • Quantity is right aligned at decimal (separator), comma as thousands separator, sign leading, round to three decimals and truncates trailing zeroes to one digit as the minimum, zero shown as 0.0.
  • Date formats to your locale (country conventions), and shows as 1/1/11. Data source field is today's date, and output format will be: (USA) M/dd/yy. See here for how to format dates.

Top

Appearance of Text on Screen and Edit Content

Text shows linked data highlighted in light yellow.

In this example, the data are PO Number and Revision represented as 1234567, and the y for Confirmed.

To edit content of a text block, select the object (text block shows an outer thin red frame) and double-click at the point you want to edit. This example shows ready to edit between Te and xt.

Content edits may or may not apply to linked data, depending on where the keying occurs. This shows keying before, in the middle of, and after a linked object of 7 digits. BETWEEN is now part of the linked text (which will be replaced). BEFORE and AFTER are constants.

Text linked from Data - and

The Link icon links data to text. Link shows the data fields available, with system fields (page counts, etc.) at the bottom of the list. Data may be linked to the entire text object by clicking once (which outlines in red) then Linked, or ...

... character(s) within the object may be highlighted, then Linked.

Top

Rules

Rules may be defined for layouts and for all objects within layouts. Objects appear only when their rules are satisfied.

For Text objects, rules may be defined for all or part of the object. This is specific to text objects, with these available in FTForm8:

  • Rules for a text object - removes the entire object when rule is not satisfied.
  • Remove empty lines button (within Text area) removes lines within the text object where no data exists for that line, floating following lines (up, down or to center). This example shows the definition and result where the fax field is absent from input data.

         

  • Rules for a portion of a text object removes that portion if the rule is not satisfied. Use to remove constants entirely where data is not present (example shows absent data for both Buyer and FOB. Constant FOB: has no rule and is shown, while Buyer: has a rule and is eliminated).

         

Define Rules for the entire text object or selected portions via the Rule button within the Data area of the toolbar.

This opens the Rules window which shows all rules and the relationship between them.

This object shown when Supplier Fax is present (not empty).

To define a rule, press Add which opens the Rule definition window.

Rule type: responses are shown in the pull-down.

  • Is empty checks the field is spaces or does not exist. Any expression can be turned into "not". The example above shows this. The rule would be master/Hdr Comment is not empty.
  • Exactly matches with a string for comparison, can Ignore case (CAPITAL letters are compared as small letters).
  • Contains with a string for comparison, can also Ignore case.
  • Matches RegEx expression requires a new RegEx expression. The Wizard may be used to select an existing expression, or a new expression keyed in Match (evaluate) what: or a selected expression modified.
  • Evaluate numeric expression to true or non zero requires setting up an arithmetic expression.

Related field: shows field names, select the field to compare.

Match (evaluate) what: is where you enter the value to compare.

  • Contains looks throughout the field, matching the characters entered.
  • Exact match compares for the length of the field, various operation on the data (trim for example) make Contains preferable for other than unmodified (on input) fields.
  • Numeric field rules should always use arithmetic expressions.

This rule allows non-Sydney locations (and would also disqualify North Sydney, Sydneyside etc.).

Matches RegEx expression requires a RexEx expression, (see here for details on RegEx expressions).

Evaluate numeric expression to true or non zero requires an Arithmetic expression, (see here for details on Arithmetic expressions).

Where a field contain multiple rules, each of the component rules may be modified as shown. In the example, the rule for the space between II and Mr./Mrs. is available for edit.

Top

Linking Fields

Link fields to text using the Link button from the top menu or the link button from the on-screen icons.

A pull-down list of sources appears, pick one to show fields.

Select the field required from the list. For Detail, you can select to add New text formula ... or New math formula... .

The field list shows the current linked field ticked (Prod Name in this example).

Master fields show the additional New variable ... selection at the top of the list.

Document fields are the calculated and system values.

Select the field to populate the text, and see Formatting Dates and Numbers as these fields are numeric or date / time fields.

date System Date and Time (see here for definition and formatting)
details left Number of detail layouts left to print
details printed Number of detail layouts printed
  Document page counts:
doc page current Current page
doc page last Last page (aka total pages)
doc page next Next page
doc page prior Prior page
  Layout elements:
layout first page First page of this document (Report Header, First Page Footer)
layout last page Last page of this document (Report Footer)
layout page footer Not the last page of this document (Page Footer, includes page 1 of a multi-page document)
layout page header Not the first page of this document (Page Header)
layout second page Second page of this document (use for a second page footer opposed on duplex paper to the First page Footer)
  Others:
job page current Current page of this job - job is the entire execution of this input file
job page last Last page of this job (aka total pages)
overall page current Overall pages, one input may produce leading and trailing pages, this is a single count for all pages of the one document,
overall page last including leading and trailing pages. A typical example would be an invoice with leading fax cover sheet and trailing T&C
overall page prior where the project covers all three forms.
overall page next

Top

Substituted Text using Formula

Substitution is the replacement of formula field content by text held externally in files in a nominated folder. The common V8 Lookup Table file (see here for details) or the V7 or V8 Substitution individual text file content replaces the formula.

The HUGE advantage of this is it allows form content to be changed or extended with no other work than a Lookup change or Notepad (Substitution file) change. Consider your company address and the impact of moving headquarters. If the address, phone number, fax number and email addresses are stored externally, a simple change is reflected IMMEDIATELY in ALL forms with just one IT involvement required in the Spooler (moving the new files into the special folder).

Substitutions MUST be based on formula, where the formula is a file name that may or may not include data field(s). The formula MUST have one of Substitute from file or Substitute from lookup table ticked. Ensure the data portion is defined as "Trim" to remove leading and trailing spaces. Formula that do NOT include data fields are effectively constant substitutions. A data substitution formula might retrieve extended product descriptions, picked up from text files, referenced by including the product number in the formula.

Rules can be set to use the looked-up value if it is there, or to use the system value if there is no lookup entry.

A record with Product Code (say 522606) might have the Formula Name Prod Desc Lookedup, with Concatenate expression ProdDesc-[order-plus-product/LineItem_ID95] to produce what is shown in Test bench.

Linking the formula substitutes the looked-up entry content after applying text attributes (size, font, style, orientation etc.) If there is no Lookup Table entry, the formula stays as ProdDesc-522606, with a soft error logged, and nothing on the form.

Use either individual, overlapping text fields or one text field with both components. Rules print the lookup value if present or the record field if not.

This shows individual fields, overlapped in production ...

... while this shows one field with both components included.

Only one field (or component) prints via rules which test for the lookup component found in the Lookup Table:

This rule is for the system value and prints where no lookup was found.

Where no lookup was found, value ProdDesc-522606 remains in the field Prod Desc lookedup which matches the rule.

The rule for the looked-up name tests for ProdDesc.* NOT found (a successful look-up).

These show linked substitution formulae in a text object (without and with Data Source).

Linked fields should be defined as Normalize "Trim" for text fields (removes leading and trailing spaces) ...

... and as Parser type Number to remove leading zeroes from supplier and customer references and similar.

Top

Selecting Linked Fields

Select linked fields in text by:

clicking once to outline the entire text,

then point (cursor is )

and click to outline that field (in blue).

A "program shortcut" to select both text and field applies where text is entirely one linked field or has a previously-selected linked field. The linked data cursor shows the field.

 

 

This tool toggles the display to show the source fields for data in text objects.

... after with data source field names shown.

Top

Tabs in Text Items

Pull Tabs to align text. Key the tab symbol into the text (tab shows purple instead of black), then pull the tabs to where you want that section aligned. Pull from the left and progress to the right. It may be useful to start the text keying with a tab to allow the first item to be positioned.

 

 



It is simpler and recommended for text with no data to Justify and Indent Text using leading Tabs. For complex indents and always where data is included, use Indented Paragraphs in Text Objects.

This is a constant text file that requires alignment as tabbed text after the bullet:

Do this by adjusting the first tab to the correct position, then pull the second tab outside the object.

Set all fonts, sizes and anything else that impacts length. Finally, set Justified , and insert tabs at the front of each line (after the bullet if that line has one), from top to bottom.

This shows the steps one at a time:

Initial object, is copied from the toolbox and brought to the correct length.

This is pasted over with the long text including bullets (you can copy from Word or any other text editor).

Move the first tab to the correct position, behind the bullet, figure shows the first tab being moved to the left.

Move the second tab behind the object, figure shows the second tab positioned, ready to release mouse right.

Make the object justified and apply all changes that impact length of the text. In the example, we have changed the point size on the bullets, on headings and have bolded certain words. Once that is done (and not before) insert tabs top-to-bottom, behind each bullet and at the start of continuation lines. The figure shows all tabs applied except the last line where we are about to insert a tab.

Note how increasing the size of the bullet to 14 point effectively inserts space between each bullet text which is 9 point.

Top

Indented Paragraphs in Text Objects

Indented paragraphs are properly presented, regardless of the size of data inserts, justification and other run-time changes such as substitution. If an indented paragraph is likely to change, take the trouble to read and understand how to apply indents.

The tools above the text block comprise Indent , Hang and Tab .

These, in conjunction with the pull-down selections from the Indent icon in the Text area provide tools for complex constructions such as paragraph clauses.

This is the Indent pull-down:

It is strongly recommended to use Customize Quick Access Toolbar to add the Indent pull-down icons for Increase , Decrease , All and Hanging as these are used repetatively.

This is the starting position.

Inserting a tab after the bullet, and pulling the tab left gives this:

Pulling the Hanging tool to match the tab shows no change, the change comes when the next step is applied.

Indent and selecting hangs the remaining lines of the paragraph.

We require the left-hanging sections through to "Supplier will provide ..." indented to the next level. First insert end-of-paragraphs (Enter) marks between contract phrases and make other changes.

Apply Indent to indent the four paragraphs. Paragraphs end with .

Insert the white bullet (see here) ahead of each of the "increased" paragraphs, and insert a tab after each white bullet.

Apply to each indented paragraph (note that paragraphs defined via Indent may contain variable-length data, will be line wrapped and can be justified).

Position the second hang above the tab to complete the indented text.

Inserting a tab in the last paragraph completes this section of the contract document. This is the printed, indented contract section:

Top

Horizontal Alignment of Text Objects

Left
Right
Centered
Justified

Justified wraps but respects deliberate line feeds. The above data was all single-space separated, then reduced in size to give this as a result.

Decimal alignment (right alignment on a nominated character, from the right of each line) is used for decimal alignment and for alignment of lists of data names and data. Decimal alignment sets word wrap off (see Word Wrap).

This is the pull-down list for character alignment.

This shows before and after alignment to the dot:

This shows before and after alignment to the colon:

Top

Vertical Alignment and Line Spacing

The Vertical Alignment tool offers the choices shown for the block of text. Adding (removing) lines retains the existing text block alignment.
This example shows identically vertically centered text blocks with two and three lines (these show slightly different at this scale but are perfectly aligned at increased scale):
The Line Spacing tool controls inter-line spacing. Select from the pull-down menu.

Top

Word Wrap

The Word Wrap tool turns word wrap on or off.

On breaks lines vertically where Text Block size is exceeded. Growing/shrinking is from the horizontal alignment point.

Off allows lines to grow/shrink horizontally.

Decimal alignment turns Word Wrap off.

Top

Font, Size, Color, Highlight Color

These are chosen from either the top Text formatting menu or the on-screen menu (press Mouse Right to open at cursor position when a text object is selected).

Font is selected from the pull-down menu:
Size is selected with these tools including "one size up" and "one size down". You can key your own point size, including decimals at the top of this block.
Style is selected from these tools (Bold, Italic, Underlined).
Font Color is selected using this tool.
Highlight Color is selected using this tool.
This is an object with all these options shown:
Bold, Italic, Underlined, Brown, Blue Highlight, Text Decimal Aligned, Spacing 2 lines.
Word wrap is off for decimal aligned text objects.

Top

On Screen Icons

Pressing Mouse Right with a text object selected shows an on-screen menu of icons at the position of the cursor. These act identically to the top menu icons.

Top

Text Manipulation

The source Text Block for these examples is word wrapped, aligned left and bottom.

Change Size

Change size tool allows pulling word wrapped text objects only to a different size. This shows word wrapped text where the "old" size is now too narrow with word wrap on the first line.

Select Change Size (to show the pull handles), and pull to size:
Text about to pull size Text after pull size

Change Rotation

The Rotation tool shows a rotation handle (green circle). Rotate by pressing and holding mouse-left over the green circle, the green circle disappears while you rotate; the object is placed when mouse-left is released. Rotation is at the center of the frame.

Note: Text rotation in PCLXL (PCL6) applies operates only at 0º, 90º, 180º and 270º angles. PostScript does not have this restriction. Text will print in PCLXL, rounded to the nearest angle with a warning posted to FormTrap Spooler's log file.

About to rotate (on the green circle)

Rotation in progress

Finished rotation

Holding down CTRL rounds the rotation to multiples of 7.5°. This allows easy selection of 90° angles (also 30° and 45°). Without Ctrl, "near misses" are possible.

Top

Nudge

Nudge uses the keyboard arrows to move text object(s) and for word wrapped text, to adjust their size. Set Nudge values using Tools, Nudge (see here for details).

Pressing a keyboard arrow moves the object the Nudge value, in the direction of the arrow.

Holding down Shift when pressing an arrow moves the bottom or right boundary by the nudge value, adjusting object size. Rotated objects have their trailing boundary moved. This may look odd for rotated text objects, see the diagrams below for examples (the boundary shifted is at the end of the text and will not compress to less than the nudge value).

Size changes first moves the boundary, then recalculates the alignment point, then re-wraps text to fit into the revised area. The example show before and after for Shift pressed plus left arrow.

   

Top

Formatting Dates and Numbers

This section uses ICU (international Components of Unicode) library, see here for documentation: http://site.icu-project.org/

The Format toolbar formats the selected, linked text field (outlined in blue).

From the Type pull-down select the output format.

Numbers format is in the locale of the computer

Change using the Locale icon, from English to French in this example.

These are format patterns for English and French. "#" is a suppressed number and "0" is not suppressed. Thousands separator is "," or space, decimal separator is "." or ",".

This shows input and formatted object for the above English format pattern. Value is rounded to 1234.600 which is suppressed back to one decimal printed.

Remove thousand separator button removes this section of the pattern.

Colon-separated from the Positive string is the negative string, with the minus sign first.

Modify the negative string to use any other position or form of negative, such as those shown.

Starting field value (will round).

String and result for trailing minus

String and result for trailing Cr

Negatives for percentages and currency are handled the same way, allowing a variety of negative representations, including ($1,234.56) as the negative.

Percentage formats as a percentage. If the originating field is a number, that is multiplied by 100 (and rounded if required). Pattern may be changed for more or less decimals, suppressed / significant digits and locale conventions applied, as for numbers.

Words converts numbers to words.

Currency formats with locale currency and format.

Apply Locale to convert values into that locale's conventions. This allows position and application of the currency and negative symbols to be changed, while the thousand separator and decimal remain fixed to that Locale's conventions.

Applying gives this as the result.

formatting_pattern_currency_french_euro_resultFurther formatting, moving currency symbols first gives these as results:


One includes the currency symbol ($, €‚ ¥ etc), two (copy and paste) formats with the ISO three-character currency. You may key a space in the format as shown (second example) and MUST edit the negative string as well as the positive string.

Date formats are keyed into the string, with the day month text translated into locale values (English shown). Date includes time-of-day in locale format.

input
formatted

For 04/02/11 (4th February, 2011), these are formatting characters and outputs. Characters other than d e M and y are included as they are keyed.
d/M/yy
dd-MM-yyyy
MM d yyyy
yyyy MM dd
eee d MMM yyyy
eeee d MMMM, yyyy
4/2/11
04-02-2011
02 4 2011
2011 04 02
Fri 4 Feb 2011
Friday 4 February, 2011

Time-of-day is similarly translated using characters h, H, m, s, S and A. These are translations for Time of Day as 13:14:15:29 (29/100th of a second):
hh:mm
HH:mm
hh:mm:ss a
01:14
13:14
01:14:15 PM

Note: the source field date is translated using a similar parser. Translation using text values for month from language to language is possible, this is in English.

input
formatted

Locale may be used to convert dates into a locale's conventions. This shows 31-03-2013 in Locale Russian with Day of Week and Month.

Top

System Date and Time

Document, date selection returns the system date and time, where date is shown in the format for the Locale you are working in. You should print this first, unformatted, to see the system presentation. The date presentation should be copied to the field, format for English is dd/MM/yyyy and is copied as (for example) 31/12/2013.

Format the date as required and include time formatting if you want time to be shown.

Top

Sometime Present, Sometime Absent fields

Detail records may contain fields and areas that are absent on some records. This applies particularly on invoices and purchase orders. This section is based on the tutorial for examples. In the tutorial (PO example), a detail record may have or not have these individual fields:

Site
Revision
Supplier code
Manufacturer with manufacturer item then optional
Comments (which may be zero to several lines)

The fully inclusive record structure is shown below, this structure may be missing any or all of the fields below the first line.

PIC

Unless you are converting Version 7 forms, go to Simple Structure to avoid reading about these less efficient methods.

Method 1 is to define a record for each case, these are the eight records required:

Full
Site, Manufacturer, Comment
Site, Manufacturer
Site, Comment
Manufacturer, Comment
Manufacturer
Comment
No optional components

Each record requires fields to test for the requirement (or not) for Site and Manufacturer lines. To do this, add text formula to the XML definition (Document window) to test which lines are required. This windows shows the formula Site required. The result of this "Concatentated text field (text)" formula is a text string which can be tested for "is empty" and "is not empty".

PIC

All records require three tests for "empty" and "not empty", the value shown is for the case where all three fields are present.

PIC

This is the final set of records:

PIC

This method is similar to Version 7, is not efficient but requires no unusual understanding nor complexity in generation.

Method 2 defines each optional line independently, in the required order, with correct spacing to fit into the same overall pattern. This requires just four records. This is more efficient, however, has these disadvantages:

  • allows a product to split across page boundaries
  • intermediate additional space between lines must be allocated at the top of each record, space allocation at the bottom of a record causes uneven layout when that component is missing.

These are the four records, all except the first have just the one test (for "is not empty") on their formula.

PIC

SIMPLE STRUCTURE

Define all fields in the one object, with Delete empty lines set (from Text Formatting area). This deletes lines with no input data, and in conjunction with the record attribute Floating height provides all cases in one structure.

PIC

Tabs are pulled to align start-of-constants (Site, Rev'n, Supplier Code, Manufacturer and Manufacturer Code).

PIC

You can also suppress literals with no following data on an individial line (for example, the literals Site:, Rev'n: and Supplier:) by selecting each literal and applying a rule to it that prints only with data.

Highlight the literal (Site:), and press the Rule icon, set the rule as shown below.

PIC

This is the finished field with literals on the lines below the main line conditional.

PIC

This is the full set of rules on literals for the two lines.

PIC

Top

Using Special Characters in Text Objects

Special characters are often required in text objects, including bullets, trade mark, registered and other symbols. The best way is to copy from program charmap.exe which is run from the Start menu (left bottom of screen). The example shows charmap being used to copy a white bullet. Note the additional menu is from the prompt Group by:.

Top

Regex Rules for Text

RegEx rules are normally generated by changing an existing RegEx rule to match the tests required. Most new RegEx rules are multiple "include" or "exclude" tests for two or more objects. If you want to add to the list of RegEx rules, see here for details.

This shows a completed RegEx rule that selects people living in three cities.

Related field: selects the data file to which the expression applies.

Wizard opens a list of available RegEx expressions. In this example we want to qualify three cities. There is a Contains either one of two selection which is close.

The equivalent RegEx expression appears in Match (evaluate) what:. Copy the last expression ...

... and paste it to the end to give three places to replace FIXMEx with what you want to test for.

Overwrite FIXMEx with what you want to test for.

Support is not available under our Support and Upgrades contract with customers. If you have issues with RegEx and/or require new RegEx made for you we will do this at our then current consulting rates, in 15 minutes increments (current rates for calendar 2013 are $60 / 15 minutes in AUD or USD).

Documentation of RegEx is on the web at this address: http://regular-expressions.info/

Top

Arithmetic Rules for Text

Evaluates numeric expression to true or non zero does not require Related field:, instead any required fields are directly included into the expression defined in Match (evaluate) what:.

Expressions are constructed by directly keying numeric values and the operators + (plus), - (minus), * (multiply) and / (divide) along with inserts.

The Insert button lists available comparisons, numeric fields and system values, select a name to insert.

This finished expression tests for true and would identify the sum of aged balances being non-zero, hence the requirement to print aged balances.

This finished expression tests for non zero and would identify any aged balance being non-zero (including offsetting plus and minus values which the prior expression would not evaluate as true).

Note: muParser is what FormTrap uses for arithmetic expressions. This is a very capable mathmatics library with many features. View the full list of operands for muParser by clicking here.

Support for muParser is not available under our Support and Upgrades contract with customers. If you have issues with muParser and/or require new muParser expressions made for you we will do this at our then current consulting rates, in 15 minutes increments (current rates for calendar 2013 are $60 / 15 minutes in AUD or USD).

Top