Problems and Solutions>Clauses

Text manipulation of a saved Clause

 

Article #:

0025

Contributor:

Daniel Todes

GF version:

All

Applies to:

Format of a Clause

Last updated:

December 19, 2001

Problem

Changing the format of the output of a Clauses.Select task, using one of the Text manipulation tasks, results in the RTF controls being displayed in a document.

Description

If you embed a Clauses.Select task in one of the following Text manipulation tasks, the result displays the RTF controls in the document together with the contents of the Clause:

 

 

The reason for this is that these tasks manipulate the format of the RTF codes as well as the contents of the Clause. If the format of the RTF codes is altered, they are no longer readable and are assumed to be text.

Solution

Click here to view a solution.

In the GhostFill Clause Editor, precede the Clause itself with a SetBlock task and end it with an EndBlock task.

 

For example:

%[SetBlock('NewFormat')]

The body of the Clause.

%[EndBlock()]

%[Clauses.Select('\Application', 'ClauseName')]%[UpperCase('NewFormat')]

THE BODY OF THE CLAUSE.

 

NOTE

The SetBlock variable "NewFormat" can be any name you prefer.

 

(See the GhostFill Scripting Language Guide for more information on tasks.)