Trim leading or trailing spaces from database fields

Applies to Infiniti v8.0 or later
Often, fields retrieved from a data source contain leading and trailing spaces. A few options are available for removing such spaces from fields returned from a database.
Note: In previous version of Infiniti the Document Format field was named Format String
Options are not limited to the data source question and can be applied to most other question types.


Option 1 – Text Data Convert

For each answer of your data source use the Data Convert drop down to convert it to the ‘Text’ type. This feature removes any spaces before the field is processed so any subsequent references to this answer will not contain extra spaces.

Option 2 – Trim Format String

Select or enter ‘TRIM’ in the format string field in of the answer to remove the extra spaces this will be removed when the field gets inserted into the document.

Option 3 – Trim() Function

The trim() function can be used by itself or nested within another function.

concat(“Your Surname is: ”, trim([Q1.FamilyName]))


Related Articles


Datasource question type




trim leading trailing space database field string convert