Field masks and formatting
How to format and apply masks to values in no-code automations
When using automations, they may sometimes not use the values exactly how you expect them to. For example, radio and tag fields will not send the apparent text in the field but the unique option id, and numbers may not show any decimals or your country's punctuation scheme.
There are tools in place to format or apply masks to customize this behavior, usually by changing the {{field}} scheme to {field|format}} scheme.
Numbers and numeric text
You can apply a numeric mask by using the scheme below:
{{field|numeric_mask("mask")}}
Example: {{phone_field|numeric_mask('(###) ###-####')}} // -> (555) 111-2222
You can format a number by using the scheme below:
{{field|number(decimal_places, 'country_code(optional)')}}
Example: {{quantity|number(2,"en-US")}} // -> 15.20
You can apply a currency mask by using the scheme below:
{{field|currency(decimal_places, 'country_code(optional)')}}
Example: {{amount|currency(2,"en-US")}} // -> US$ 1,234.56
You can apply a percentage mask by using the scheme below:
{{field|percent(decimal_places, 'country_code(optional)')}}
Example: {{conversion_rate|percent(2,"en-US")}} // -> 98.12%
Radio
You can use the option's label (the text that shows in the interface) by using the scheme below:
{{field|option("label")}}
Example: {{marital_status|option('label')}} // -> Single
You can use the option's id (the true value in the field) by using the scheme below:
{{field|option("id")}}
Example: {{marital_status|option('id')}} // -> abc123xyz789
Multiple Select and Tags
You can use the option's label (the text that shows in the interface) by using the scheme below:
{{field|option("label","separator")}}
Example: {{tags|option('label',"/")}} // -> Tech/Urgent
You can use the option's id (the true value in the field) by using the scheme below:
{{field|option("id","separator")}}
Example: {{tags|option('id',"/")}} // -> abc123xyz789/def456hui321
Updated about 1 year ago