Help Center
Go to siteOpen app
  • Help Center
  • Welcome to the Help Center!
  • Guides
    • Designing a Basic Template from Scratch
    • Adding Variables
    • e-signatures with SignNow
    • How to create Tables
  • Templates
    • What's a template?
    • Page Elements
      • Layout Elements
      • Content Elements
      • Conditional Logic
      • Repeating Elements
    • Settings
    • Headers & Footers
    • Data and Variables
      • Syntax
      • Data Types
      • Formatting
      • Functions
        • $calc (beta)
      • Operators
    • Template Designer v2 (Beta)
      • Connections
        • Airtable Connection
        • HubSpot (Coming Soon)
      • Fields Editor
      • Tokens
      • Coming soon
  • Documents
    • What is a Document?
    • Minted Documents
  • Additional Resources
    • How-To Videos
      • Formatting Variables
      • Airtable Integrations
      • Airtable Data and Variables Videos
      • How to add variable images from your Airtable attachments
      • How to filter items in your Documents
      • How to group items in your Documents
      • Signing Documents with SignNow and Zapier
      • Add charts to your Documents with QuickChart.io
      • Add a Word Cloud chart to your Documents with QuickChart.io
      • Using Make.com (Integromat) to create line items in your documents
      • How to QR codes to your documents with QuickChart.io
      • How to add a progress chart to your documents with QuickChart.io
      • How to connect your Documint account using API keys
      • How to connect your Documint account to Airtable using your Personal Access Token (PAT)
    • Glossary
    • Frequently Asked Questions
    • Troubleshooting
  • Integrations
    • HubSpot
      • Installing the Documint app
      • Connecting your Documint account
      • Navigating the Documint App
      • Working with Custom Object Data
      • Adding HubSpot Properties to Your Template
      • Generating Your documents
      • Using Quick-Create
      • Using Workflows to Create Your Documents
      • Troubleshooting the Documint App
      • Uninstalling the Documint App
    • Airtable
      • Add your Airtable Personal Access Token
      • Airtable Extension
      • Generation Link
      • Automation Script
      • Field Types to Documint Variables
      • Adding Images from Airtable
      • Expanding Linked Records
      • Lookup Fields
      • Documents from Multiple Records
      • Duplicate Document Prevention
      • Password Protection
      • Creating Documents
        • Preview Mode
    • Zapier
    • Make.com
    • Coda
    • Stacker
    • Noloco
    • Softr
    • Pory
    • REST API
Powered by GitBook
On this page
  • Comparison Operators
  • eq
  • ne
  • gt
  • lt
  • gte
  • lte
  • Identity Operators
  • isNull
  • isNotNull
  • isNil
  • isNotNil
  • isEmpty
  • isNotEmpty
  • Array Operators
  • isIn
  • isNotIn
  • String Operators
  • startsWith
  • endsWith
  • contains
  • doesNotContain
  • matches
  • Logical Operators
  • and
  • or

Was this helpful?

  1. Templates
  2. Data and Variables

Operators

Comparison Operators

eq

{{$eq value1 value2}}

Evaluates to true if value1 is equal to value2.

Arguments

Name
Description
Type
Required

value1

A static value or a variable path

StringNumberBoolean

value2

A static value or a variable path

StringNumberBoolean

Returns

(Boolean)

Example

{{#if ($eq category "sports") }}Category is sports{{/if}}

{
    "category":"sports"
}

Category is sports

ne

{{$ne value1 value2}}

Evaluates to true if value1 is not equal to value2.

Arguments

Name
Description
Type
Required

value1

A static value or a variable path

StringNumberBoolean

value2

A static value or a variable path

StringNumberBoolean

Returns

(Boolean)

Example

{{#if ($ne category "sports") }}Category is not sports{{/if}}

{
    "category":"sports"
}

This is a sports category

gt

{{$gt number1 number2}}

Evaluates to true if number1 is greater than the number2.

Arguments

Name
Description
Type
Required

number1

A static value or a variable path

Number

number2

A static value or a variable path

Number

Returns

(Boolean)

Example

{{#if ($gt grand_total 1500) }}Grand total is greater than 1500{{/if}}

{
    "grand_total": 1600
}

Grand total is greater than 1500

lt

{{$lt number1 number2}}

Evaluates to true if number1 is less than number2.

Arguments

Name
Description
Type
Required

number1

A static value or a variable path

Number

number2

A static value or a variable path

Number

Returns

(Boolean)

Example

{{#if ($lt score 50) }}Score is less than 50{{/if}}

{
    "score": 25
}

Score is less than 50

gte

{{$gte number1 number2}}

Evaluates to true if number1 is greater than or equal to number2.

Arguments

Name
Description
Type
Required

number1

A static value or a variable path

Number

number2

A static value or a variable path

Number

Returns

(Boolean)

Example

{{#if ($gte score 50) }}Score is greater than or equal to 50{{/if}}

{
    "score": 50
}

Score is greater than or equal to 50

lte

{{$lte number1 number2}}

Evaluates to true if number1 is less than or equal to number2.

Arguments

Name
Description
Type
Required

number1

A static value or a variable path

Number

number2

A static value or a variable path

Number

Returns

(Boolean)

Example

{{#if ($lte score 50) }}Score is less than or equal to 50{{/if}}

{
    "score":50
}

Content to display for sports

Identity Operators

isNull

{{$isNull value}}

Evaluates to true if value is null.

Arguments

Name
Description
Type
Required

value

A static value or a variable path

Any

Returns

(Boolean)

Example

{{#if ($isNull category) }}Category is null{{/if}}

{
    "category": null
}

Category is null

isNotNull

{{$isNotNull value}}

Evaluates to true if value is not null.

Arguments

Name
Description
Type
Required

value

A static value or a variable path

Any

Returns

(Boolean)

Example

{{#if ($isNotNull category) }}Category is not null{{/if}}

{
    "category": "sports"
}

Category is

isNil

{{$isNil value}}

Evaluates to true if value is null or undefined .

Arguments

Name
Description
Type
Required

value

A static value or a variable path

Any

Returns

(Boolean)

Example

{{#if ($isNil category) }}Category is nil{{/if}}

{
    "category":null
}

Category is nil

isNotNil

{{$isNotNil value}}

Evaluates to true if value is not null or undefined.

Arguments

Name
Description
Type
Required

value

A static value or a variable path

Any

Returns

(Boolean)

Example

{{#if ($isNotNil category) }}Category is not nil{{/if}}

{
    "category":"sports"
}

Category is not nil

isEmpty

{{$isEmpty path}}

Evaluates to true if the value of the variable path is undefined, null , an empty string ('') , empty object ({}), or an empty array ([]).

Arguments

Name
Description
Type
Required

path

A path to a variable to check for a value

Any

Returns

(Boolean)

Example

{{#if ($isEmpty category )}}Category is empty{{/if}}

{
    "name":"soccer"
}

Category is empty

isNotEmpty

{{$isNotEmpty value}}

Evaluates to true if value is not undefined, null, an empty string (''), an empty object ({}), and not an empty array ([]).

Arguments

Name
Description
Type
Required

path

A path to a variable to check for a value

Any

Returns

(Boolean)

Example

{{#if ($isNotEmpty category) }}Category is not empty{{/if}}

{
    "category":"sports"
}

Category is not empty

Array Operators

isIn

{{$isIn value array}}

Evaluates to true if value is in array.

Arguments

Name
Description
Type
Required

value

A static value or a variable path

StringNumberBoolean

array

Array of values to check for value

String ArrayNumber ArrayBoolean Array

Returns

(Boolean)

Example

{{#if ($isIn "sports" categories) }}Sports is in categories{{/if}}

{
    "categories":[
        "sports",
        "entertainment",
        "news"
    ]
}

Sports is in categories

isNotIn

{{$isNotIn value array}}

Evaluates to true if value is not in array.

Arguments

Name
Description
Type
Required

value

A static value or a variable path

StringNumberBoolean

array

Array of values to check for value

String ArrayNumber ArrayBoolean Array

Returns

(Boolean)

Example

{{#if ($isNotIn "sports" categories)}}Sports is not in categories{{/if}}

{
    "categories":[
        "entertainment",
        "weather",
        "news"
    ]
}

Sports is not in categories

String Operators

startsWith

{{$startsWith string1 string2}}

Evaluates to true if string1 starts with string2.

Arguments

Name
Description
Type
Required

string1

A static value or a variable path to check for string2

String

string2

A static value or a variable path to check for in string1

String

Returns

(Boolean)

Example

{{#if ($startsWith movie "Bourne") }}Movie starts with Bourne{{/if}}

{
    "movie":"Bourne Identity"
}

Movie starts with Bourne

endsWith

{{$endsWith string1 string2}}

Evaluates to true if string1 ends with string2.

Arguments

Name
Description
Type
Required

string1

A static value or a variable path to check for string2

String

string2

A static value or a variable path to check for in string1

String

Returns

(Boolean)

Example

{{#if ($endsWith movie "Story") }}Movie ends with Story{{/if}}

{
    "movie":"Toy Story"
}

Movie ends with Story

contains

{{$contains string1 string2}}

Evaluates to true if string1 exists in string2.

Arguments

Name
Description
Type
Required

string1

A static value or a variable path to check for string2

String

string2

A static value or a variable path to check for in string1

String

Returns

(Boolean)

Example

{{#if ($contains movie "Bronx") }}Movie contains Bronx{{/if}}

{
    "movie":"A Bronx Tale"
}

Movie contains Bronx

doesNotContain

{{$doesNotContain string1 string2}}

Evaluates to true if string1 does not exist in string2.

Arguments

Name
Description
Type
Required

string1

A static value or a variable path to check for string2

String

string2

A static value or a variable path to check for in string1

String

Returns

(Boolean)

Example

{{#if ($doesNotContian movie "Batman") }}Movie does not contain Batman{{/if}}

{
    "movie":"The Dark Knight"
}

Movie does not contain Batman

matches

{{$matches string expression}}

Arguments

Name
Description
Type
Required

string

A static value or a variable path to evaluate the regular expression against

String

expression

Regular expression to evaluate

String

Returns

(Boolean)

Example

{{#if ($matches category "^spo.*") }}Category matches regular expression{{/if}}

{
    "category":"sports"
}

Category matches regular expression

Logical Operators

Logical operators can be used in conjunction with #if statements and other operators to perform logical checks.

and

{{$and arg1 arg2 ...}}

Returns true if all arguments evaluate to true

Arguments

Name
Description
Type
Required

arg1

1st argument to evaluate

Boolean

arg2

2nd argument to evaluate

Boolean

...

Remaining arguments to evaluate

Boolean

Returns

(Boolean)

Example

This example checks if the qty is greater than 5 and the amount is less than 200

{{$and ($gt qty 5) ($lt amount 200) }}

{
    "amount": 150,
    "qty": 4
}

true

or

{{$or arg1 arg2 ...}}

Returns true if any of the arguments evaluate to true

Arguments

Name
Description
Type
Required

arg1

1st argument to evaluate

Boolean

arg2

2nd argument to evaluate

Boolean

...

Remaining arguments to evaluate

Boolean

Returns

(Boolean)

Example

This example checks if the qty is greater than 5 or the amount is less than 200

{{$or ($gt qty 5) ($lt amount 200) }}

{
    "amount": 500,
    "qty": 4
}

true

Previous$calc (beta)NextTemplate Designer v2 (Beta)

Last updated 1 year ago

Was this helpful?

Returns true if string matches a .

regular expression