If starts with

Conditionally merges different content depending on whether a value begins with the text you give. Use it when the start of a code carries meaning, such as a country prefix on a program code or a phone number.

Syntax

{{#ifStartsWith data value}}true content{{else}}false content{{/ifStartsWith}}

Parameters

Name Type Required Description
Data Text Required The value to evaluate.
Value Text Required The text the value must begin with.
Note: Capitalization is ignored, so US matches a value beginning us.
Note: Only the beginning of the value is checked. To match the text anywhere within it, use If contains.

Examples

The examples below are based on the following sample content:

{{#ifStartsWith Contact.programCode "US"}}United States{{else}}International{{/ifStartsWith}}

A. The contact's programCode field has a value of 123US

International

The value contains US but does not begin with it, so the false content merges.

B. The contact's programCode field has a value of US456

United States

Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.

Still need help? Contact Us Contact Us