Formulas and functions

What is a Tines formula? 

Think of a formula in Tines like a little piece of code (similar to a spreadsheet formula) that transforms data flowing through your stories. When you build a story, you can use formulas to compute, reshape, or inspect data coming from upstream actions. Formulas are placed within a pill and are configured via that pill's editor pop-up.

What is a Tines function? 

A function is a building block used inside those formulas. It’s like a predefined helper that performs a specific task. Functions allow you to perform operations on event data passing through your story.

A function in Tines is a reusable instruction that performs a specific task on the data you provide. Each function:

  • Has a specific name (written in uppercase).

  • Takes zero or more inputs (called arguments).

  • Processes those inputs according to its purpose.

  • Returns a result that can be used in your story.

For example, the MINUS function subtracts one number from another number:

MINUS(10, 5)

This returns 5 when the action is executed.

Why are formulas and functions important? 

  • Data transformation: As events flow through your story, you’ll often need to clean, manipulate, or compute on data. Functions let you do that.

  • Logic: With functions, you can branch or gate outputs based on incoming data.

  • Reusability & maintainability: Because you can nest functions within each other and chain them together, your formulas can remain clean even as they get more powerful. Nesting and chaining functions are covered later in our Builder: Intermediate learning path.

  • Readability: Using functions makes your formulas more expressive. Someone reading your story later (or even future you in a week!) can make sense of why something is computed.

Was this lesson helpful?

Built by you,
powered by Tines

Already have an account? Log in.