Format Text
Verb: formatText
Formats the input text according to CPF, CNPJ, PIS, CEP or Credit Card standards.
Syntax
formatText --text(String) --texttype(TextFormattingType) (String)=value
Inputs
Script | Designer | Required | AcceptedTypes | Description |
---|---|---|---|---|
--text | Text | Required | Text | Input text for formatting. |
--texttype | Type | Required | TextFormattingType | Options for formatting Text .
; |
Outputs
Script | Designer | AcceptedTypes | Description |
---|---|---|---|
value | Text | Text | Text formatted according to Type selected. |
Example
Example 1: Formats the contents of Text to CEP (Brazil).
defVar --name textEntry --type String --value 15086260
defVar --name formattedText --type String
formatText --text "${textEntry}" --texttype "BrazillianCEP" formattedText=value
logMessage --message "${formattedText}" --type "Info"
// This example produces the following result:
// "15086-260"
Example 2: Formats the contents of Text to CPF (Brazil).
defVar --name textEntry --type String --value 08644459899
defVar --name formattedText --type String
formatText --text "${textEntry}" --texttype "BrazillianCPF" formattedText=value
logMessage --message "${formattedText}" --type "Info"
// This example produces the following result:
// "086.444.598-99".
Remarks
It is necessary to inform in the Text parameter, the content according to the format Type .