Portant Docs
Launch PortantInstall App in Hubspot ↗︎
Portant Docs
Portant Docs
  • 👋Welcome
  • 🟢Product Updates
  • 🌱Getting Started
    • How to Sign up
      • Sign-up without a Google account
    • Quickstart
    • Ask for Help
      • Support Tickets
      • Support Codes
      • Screenshots
      • Developer Console
      • 400 Error
      • Resolve: API developer key is invalid error
      • How to request a transfer of your Portant account
    • Templates
  • 💫Personalise Documents
    • Adding Hyperlinks
    • Adding Images
    • Use custom tag names
    • Tag Formulas
      • Global tags
      • Tag Formulas
      • Tag IF Statements
    • Invalid Tags
    • Portant AI Content
    • Dynamic Google Sheets Charts
    • Tag Checker
    • Add online payment links
    • Add Stripe Payment Links to Your eSign Portal
  • 🌐Sources
    • Google Forms
      • Add formula fields to your Google Form workflow
      • {{tags}} for Google Forms
    • Google Sheets
      • Google Sheets Auto-create
      • How to source data from multiple Sheets
      • Saving Document Links to your Sheet
      • Data Grouping
    • HubSpot
      • How to install the Portant App in HubSpot
        • How to Add Portant App Cards to HubSpot
      • Create a Document in HubSpot
      • How to manage and select HubSpot Properties
        • Full list of available HubSpot Properties
      • Trigger HubSpot Workflows from Portant
      • Add a Portant Action to a HubSpot Workflow
      • How to view created documents in HubSpot
      • Add multiple line items into a single document
      • Add Deal Tags using Portant document statuses
      • Portant eSignatures + HubSpot
      • Review and approve documents in HubSpot
      • Generate Documents from any Custom Object in HubSpot
    • Zapier
    • Glide
    • Webhooks
      • Webhook Data Grouping
    • Xero
    • Copper
      • Installing the Copper integration
      • Create your first Copper workflow
      • Generating your first document from Copper
    • Typeform
    • Tally
  • 📄Template Docs
    • Google Docs
    • Google Slides
    • Microsoft Word
    • Microsoft PowerPoint
    • Fillable PDF
  • 💡Use Cases
    • eSignatures Requests
    • Incident Report
    • Quarterly Business Reviews
    • Invoices
    • Convert Form Responses to PDFs
  • ✒️eSignatures
    • Getting Started
    • Request Signatures (without a source)
    • Request Multiple Signatures
    • Customise Signature Request Email
    • Create Preview Links for Signature Requests
    • Resend signature requests
    • Cancel Signature
    • Add Audit to eSignatures
    • Request Info On Signing
    • eSigning Laws & Compliance
      • United States: E-SIGN Act and UETA ✅
      • Canada: PIPEDA and Electronic Transactions Act ✅
      • EU: eIDAS Regulation for Electronic Signatures ✅
      • UK: eIDAS Regulation and Electronic Communications Act 2000 ✅
      • Australia: Electronic Transactions Act (ETA) ✅
      • New Zealand: Electronic Transactions Act (ETA) 2002 ✅
      • Israel: Electronic Signature Law 2001
  • ⚡Automation
    • Workflow Filters
    • Re-run an automation
    • Review Block
    • Review and Approve Documents
    • Converting docs to different file types
      • Microsoft Word (.docx)
      • Microsoft Powerpoint
      • Create PDF outputs
      • Save an output as a Microsoft Excel file (.xlsx)
  • ✉️Emails
    • Share a Doc via Email
    • Email Tracking
    • Send from aliases
    • Send Outlook Emails
    • Customize Your Email Content with HTML Editing
  • 📄Outputs
    • Customize Output File names
    • Auto-filing Output Files
    • Changing Output Folder
    • Search and filter your outputs
  • Deleting Outputs in Portant
  • 🎁Portant Add-ons
    • Data Merge
      • How to set-up a Google Sheets source
        • Data Merge Settings for Google Sheets sources
        • Automatically create documents
      • How to set-up a Google Forms source
        • Data Merge Settings for Google Forms
        • Automatically create documents
        • Edit Response and Pre-filled Response Links
      • Inserting Images
      • Advanced Settings
        • Editing tag names
        • Timezone, date and time format settings
        • Editing the Output Folder
        • Conditional logic for emails
        • Conditional Logic for Data Merges
        • Data Grouping in Portant Data Merge
    • Document Merge - Trello Power-up
  • 👥Teams
    • Creating Your Team
    • Sharing Workflows
    • Creating Folders in the Workflows Tab
    • Managing team permissions
    • Whitelabeling eSign Portal
  • ⚙️Settings
    • Change Language Settings
    • How to Set Up Your Account's Global Formatting Settings
  • Delete Multiple Workflows at Once
  • 💳Billing
    • Update Billing
  • Developer
    • Build with Portant
Powered by GitBook
On this page
  • Arithmetic
  • Builtin Formulas
  • Numeric
  • Numeric Aggregated Formulas
  • Decimal Place Modifier
  • Date/Time Arithmetic
  • Formula Glossary
  • ‍Sum‍
  • Average‍
  • Maximum‍
  • Minimum‍
  • Round
  • Multiply‍
  • Add
  • Text
  • Concatenate
  • Text Join
  • Truncate
  • Filter and Sum (SUMIF)
  • Feedback and feature suggestions

Was this helpful?

  1. Personalise Documents
  2. Tag Formulas

Tag Formulas

Sometimes you might need to calculate values within your document template. Within Portant you can add calculations directly within tags simply by include = at the beginning of the tag.

For example you may have the field "Line Item Price" from your source and you would like to display the value in your document with a 10% percent tax applied. This can be calculated by multiplying (*) the Line Item Price field by 1.1. The Tag formula to do so would look like this:

{{= Line Item Price * 1.1}}

Arithmetic

The follow arithmetic operations can can be used in Tag Formulas:

Symbol
Operation

+

Addition

*

Multiplication

-

Subtraction

/

Division

Multiple operators and parentheses ( and ) can be used to make more complex expressions.

Builtin Formulas

Similar to tools like Google Sheets and Excel. Certain pre-made formulas can be used within tags. For example the ROUND formula can be used to limit a numeric value to set number of decimal places.

{{Line Item Price}} -> 24.1234
{{=ROUND(Line Item Price, 2) -> 24.12
{{=ROUND(Line Item Price) -> 24

The following builtin formulas exist within Portant

Formula
Description

ROUND(Tag, [Places])

Rounds the numeric value of Tag to the number of decimal Places specified. The second variable can be omitted to round the value to a whole number.

DEFAULT(Tag, Default Value)

Provide a value to be used in the case that the value of the provided tag is blank.

ADD(Tag 1, Tag 2, [...])

Adds the numeric value of two or more tags together. This formula is the same as simply using "+".

MULTIPLY(Tag 1, Tag 2, [...])

Multiplies the numeric value of two or more tags together. This formula is the same as simply using "*".

TRUNCATE(Tag, Length)

Shortens the text based value of Tag by the specified Length.

LOWER(Tag)

Converts the value of tag to lowercase text.

UPPER(Tag)

Converts the value of tag to UPPERCASE text.

[ ] Specifies that this paramater is optional.

Note, direct values can be used in the place of all tags and vice versa.

Numeric

Numeric Aggregated Formulas

Within a Data Grouping Table:
+-----------------------------+
|1. {{Line Item Price}} -> 10 |
+-----------------------------+
|2. {{Line Item Price}} -> 20 |
+-----------------------------+
|3. {{Line Item Price}} -> 30 |
+-----------------------------+

{{=SUM(Line Item Price)}} -> 60

The follow numeric aggregated formulas exits within Portant:

Formula
Description

SUM(Tag)

Adds together all the values for Tag provided

PRODUCT(Tag)

Multiplies together all the values for Tag provided

AVG(Tag)

Calculated the average of all values for Tag

MAX(Tag)

Finds the largest of all values for Tag

MIN(Tag)

Finds the smallest of all values for Tag

Aggregated formulas can also be used anywhere within the document to make more complex formulas. For example you could calculate the percentage a certain Line Item Price is of the total.

{{= (Price / SUM(Price)) * 100 | 2}}%

For the line items in the table example above this would create the following result:

+-------------------+------------------------------------------------+
|1. {{Price}} -> 10 | {{= (Price / SUM(Price)) * 100 | 2}}% -> 0.16% |
+-------------------+------------------------------------------------+
|2. {{Price}} -> 20 | {{= (Price / SUM(Price)) * 100 | 2}}% -> 0.33% |
+-------------------+------------------------------------------------+
|3. {{Price}} -> 30 | {{= (Price / SUM(Price)) * 100 | 2}}% -> 0.50% |
+-------------------+------------------------------------------------+

Decimal Place Modifier

By including the symbol | followed by the number of decimal places you would like to limit the result to an expression can be rounded similar to the ROUND formula itself.

For example we can round the following arbitrary expression to 3 decimal places like so:

{{1.1234 + 1.0 | 3}} -> 2.123

Date/Time Arithmetic

Using one of the formulas listed below you can perform arithmetic (+ and -) on date fields.

{{= Date + DAYS(30)}} -> <The value will be 30 days from the value of Date>

The formula will work with the following where N is amount to increase by:

  • MINUTES(N)

  • HOURS(N)

  • DAYS(N)

  • WEEKS(N)

Formula Glossary

‍Sum‍

Returns the sum of a series of field values, including all field values within a Data Grouping tag.

Syntax

{{=SUM(tag1, tag2, ...)}}

  • tag1 - The first tag to add together.

  • tag2, ... - [ OPTIONAL ] - Additional tags to add to tag1.

The tags included in the brackets don't need to be accompanied by "{{" and "}}"

Average‍

The AVERAGE function returns the numerical average value in a group of tags, including all field values within a Data Group tag

Syntax

{{=AVG(tag1, tag2, ...)}}

  • tag1 - The first tag or Data Group tag to consider when calculating the average value.

  • tag2, ... - [ OPTIONAL ] - Additional tags to consider when calculating the average value.

The tags included in the brackets don't need to be accompanied by "{{" and "}}"

Maximum‍

Returns the Maximum value from a group of tags, including all field values within a Data Group tag

Syntax

{{=MAX(tag1, tag2, ...)}}

  • tag1 - The first tag or Data Group tag to consider when calculating the maximum value.

  • tag2, ... - [ OPTIONAL ] - Additional tags to consider when calculating the maximum value.

The tags included in the brackets don't need to be accompanied by "{{" and "}}"

Minimum‍

To find the Minimum value from a group of tags, including all field values within a Data Group tag

Syntax

{{=MIN(tag1, tag2, ...)}}

  • tag1 - The first tag or Data Group tag to consider when calculating the minimum value.

  • tag2, ... - [ OPTIONAL ] - Additional tags to consider when calculating the minimum value.

The tags included in the brackets don't need to be accompanied by "{{" and "}}"

Round

Rounds the numeric value of a field to a certain number of decimal places.

Syntax

{{=ROUND(tag, [places])}}

  • Tag - The value to round to places number of places.

  • places - [ OPTIONAL - 0 by default ] - The number of decimal places to which to round.

Sample usage

{{=ROUND(1.234, 2)}} -> 1.23

{{=ROUND(1.234)}} -> 1

Multiply‍

Returns the product of two fields or numeric values. Equivalent to the `*` operator.

Syntax

{{=MULTIPLY(tag1, tag2)}}

  • tag1 - A field containing a numeric value or a direct numeric value e.g. 6.

  • tag2 - A field containing a numeric value or a direct numeric value e.g. 7.

Add

Returns the sum of two fields or numeric values. Equivalent to the `+` operator.

Syntax

{{=ADD(tag1, tag2)}}

  • tag1 - A field containing a numeric value or a direct numeric value e.g. 19.

  • tag1 - A field containing a numeric value or a direct numeric value e.g. 23.

Text

Concatenate

Appends strings to one another.

Sample usage

{{=CONCATENATE('Hello', ' ', 'World')}}-> "Hello World"

{{=CONCATENATE(Line Item Name)}} -> "Item AItem BItem C" (no spaces)

CONCATENATE(A2:B7)

Syntax

CONCATENATE(tag_name_1, [tag_name_2, ...])

  • string1 – Any field or data grouping field from the source or a literal string in quotes.

  • string2 … - Any amount of other fields, data grouping fields or literal strings.

Text Join

Combine text of multiple fields or a data grouping field containing multiple values with a specifiable delimiter between each item.

Sample Usage

{{=TEXTJOIN(“ | “, "Hello", "World")}} -> "Hello | World"

{{=TEXTJOIN(“, ”, Line Item Name)}} -> "Item A, Item B, Item C"

Syntax

{{=TEXTJOIN(delimiter, tag_name_1, [tag_name_2, ...])}}

  • delimiter - A string, possibly empty, or another field. If empty, text will be simply concatenated.

  • tag_name_1 - Any field or data grouping field from the source or a literal string in quotes.

  • tag_name_2, ... - Any amount of other fields, data grouping fields or literal strings.

You can also use {{=TEXTJOINNONEMPTY(...)}} to skip empty values in the result.

Truncate

Shortens the value of a field or literal text string by the specified length.

Syntax

{{=TRUNCATE(tag, length)}}

  • tag - The text to be truncated.

  • length - The number of characters to to limit the text to.

If length is greater than the number of characters in value, value is returned without modification.

Example {{Message}} -> "Hello World" {{=TRUNCATE(Message, 5)}} -> "Hello"

Filter and Sum (SUMIF)

Sum values based on a certain condition

Syntax

{{=SUMIF(Condition Tag = "Something", Numeric Data Grouped Field)}}

Feedback and feature suggestions

We created Portant in 2021 and the feedback we have received since then has been very helpful and greatly appreciated. If you have any feedback, please feel free to send us an email at contact@portant.co

Thanks,

Blake and James

PreviousGlobal tagsNextTag IF Statements

Last updated 5 months ago

Was this helpful?

Particular builtin formulas are specifically designed to work with workflows in Portant and will aggregate all the grouped values of the specified tag. A particular useful formula is SUM which will add together all values for the specified tag. This is an effective way to calculate totals within your template.

💫
Data Grouping