CLEAN
Use CLEAN on text imported from other applications that contains characters that may not display correctly.
Use
CLEAN( text )
Removes all non-printable characters from the text.
| Parameter | Required | Description |
|---|---|---|
| text | Yes | the text from which to remove non-printable characters |
| Returns | Text |
Examples
Sanitising Legacy Data from a Trigger Form
When a user starts an approval by copying and pasting data from a legacy database or an old PDF into a form, they might inadvertently include hidden control characters. To ensure this data is safe to use in later steps, you can apply CLEAN in an Input Mapping formula or a Variable Update formula.
- Formula:
CLEAN(@Trigger.out.LegacyNotes) - Logic: This formula takes the "LegacyNotes" captured during the trigger step and strips out any non-printable characters. The resulting output is a "clean" text string containing only printable characters, which can then be safely displayed to a reviewer or stored in a variable.
Preparing External Customer Data for Display
If your workflow involves an activity that retrieves information from an external source (such as a customer lookup), the returned data might contain formatting characters that could break the layout of your GoApprove form.
- Formula:
CLEAN(@LocateCustomer.out.FullName) - Logic: If the field
@LocateCustomer.out.FullNamecontains non-printable characters, they will be removed, and only the printable characters will be returned. This ensures that when you use a Display Data element or a Content Block in the Form Builder, the customer's name appears correctly and professionally without broken character symbols.