Applying a format string to a field or variable emedded into an RTF paragraph.

You may come across a case where you need to apply a Format String to a field or variable that is being embedded into an RTF paragraph.

Normally you would enter the format string into the variable or field mapping command directly.  However, this is not an option for RTF embedding.

Instead, start by creating a non-assigned text variable. Use a name that easily identifies this variable as the formatted value of your original field or variable.  You will embed this variable in the RTF, in place of your original field or variable.

Next, below the variable definition but before the RTF command, create a function command.  In this function, set your result variable to your newly defined text variable.  Set the function type to "format." 

(This option will only be available if the result variable is a text variable. For this reason, your new variable must be text, even if the original value is not.  The format will still work correctly.)

The first parameter in your function should be your original field or variable.   The second parameter will be a fixed value, containing your format string.

Once you click okay, your new text variable will contain the formatted value, which you can then embed within the RTF.

There is a sample map and data file attached to this ticket which demonstrates this process, for additional reference.

0 Comments

Article is closed for comments.
Powered by Zendesk