RockTomate

RockTomate

    ›Formulas

    Information

    • Introduction
    • Requirements
    • Terminology
    • Update History

    References

    • Step References
    • Macro References

    Workflows

    • Creating Job
    • Running Job

    User Interface

    • Job Editor Window
    • Step Browser Window
    • Step Properties Window
    • Variable Manager Window
    • Job Session Console Window

    Event Manager

    • Overview
    • Getting Started
    • Job Execution Properties

    Variables

    • Variable Basics
    • Root Variables
    • Creating Variables
    • Variable Banks
    • Variable Overriding
    • Persistent Variables

    Formulas

    • Formula Basics
    • Resolving Variables
    • Using Macros
    • Output Fields
    • Multi-Array Formulas
    • String Interpolation

    Advanced

    • Adding Third-Party Steps
    • Running from CLI
    • Creating a Step
    • Creating a Macro
    • Type Conversion

    Using Macros

    Macros are lightweight functions that accept parameters and return a value: just like an ordinary function. They're called from within formulas.

    To learn about available macros, see Macro References.

    Calling Macros

    Inside of a formula, macros can be called just like an ordinary function:

    macro1(arg1)
    

    Passing Variables

    Naturally, you can pass variables into macros:

    macro1(%VAR_NAME%)
    

    Passing Macros

    Macros can also be nested within each other

    macro1(arg1, macro2(arg2, arg3))
    

    Passing Whitespace

    By default, whitespace characters are trimmed off parameters, but this can be prevented by surrounding your arguments in quotation marks ".

    length(Hello )
    
    Output: 5
    

    And if we use quotation marks:

    length("Hello ")
    
    Output: 6
    

    This works with any type of arguments that you supply including variables and macros.

    sum("%VAR_TEN%", "sum("10", "10")")
    
    Output: 30
    

    Escaping Quotation Marks

    Quotation marks can be escaped using an additional set of quotation marks.

    length("")
    Output: 0
    
    length("""")
    Output: 2
    
    Last updated on 3/14/2024
    ← Resolving VariablesOutput Fields →
    • Calling Macros
    • Passing Variables
    • Passing Macros
    • Passing Whitespace
    • Escaping Quotation Marks
    Docs
    IntroductionUpdate History
    Community
    Forum ThreadDiscordTwitter
    More
    Asset StoreEdit on GitHub
    Copyright © 2024 HardCode Lab