Logo Text Blaze

  • Docs
  • Community
  • Documentation

    No search results

    Text Blaze

    Loading...

    Data Blaze

    Loading...

    Community Forums

    Loading...
Add to Chrome –  It's Free! Go to Dashboard ›
Commands

{=} (Formula Command)

Summary: Dynamic updating formula that can use and create variables
Sample Usage
a) {= sqrt(49) * log(10)/2}
b) {= 73 / 51; format=$,.2f}
c) {formtext: name=x; default=4} * {formtext: name=y; default=3} = {= x * y}
d) {= 81 >= 23}
_

Quick Overview Video

Settings


Setting NameTypeDescription
PositionalformulaThe formula.
formattextHow to format a numeric output of the formula.
General Command Settings
trimyes/no/left/rightIf yes whitespace is removed before and after the command. If left, only whitespace to the left is removed. If right, only whitespace to the right is removed.

The Formula Command is a special command in Text Blaze that allows you to use dynamic math, create variables, and utilize variables previously created throughout the snippet.

Also, notice how this command looks slightly different from other commands. It uses an equal sign between the {} instead of a word like the other commands.

Despite the difference in looks, the formula command has the same syntax as other commands. The first setting, a positional setting, takes a Text Blaze formula. The second optional setting, format, allows you to format numeric outputs.

Blaze Formula Reference

The {=} (Formula Command), {if}, and {repeat} commands, all utilize the Blaze Formula Syntax to let you use formulas and calculations as part of your snippets. There are features like predefined functions, lists, regular expressions, and more.

Visit the Blaze Formula Reference page and learn about what's possible.

Creating Variables With Assignment Mode

The formula command can also be used to create variables which can then be used in your other formulas within the same snippet.

To use it this way put the name of the variable before the formula command's = sign.

When used in assignment mode, the formula command won't display any output.

Assigning Form Values with Formulas
{x=10} {y=20; trim=yes} x + y = {=x+y} x * y = {=x*y}
_

To learn more about using variables in your snippets, visit the Blaze Formula Reference page.

It's also possible to use the {=} (Formula Command) command in combination with forms and form values.

Formatting numbers with the format setting

The optional format setting allows you to control how numeric outputs are formatted in formulas. The formatting will attempt to use the user's locale specified in the Text Blaze account settings.

The following described the available options:

[​[fill]align][sign][symbol][0][width][,][.precision][type]

The output number formatting syntax and the blaze formula syntax are not the same.

More information and examples on output number formatting can be found here.

It is useful to see examples of format definitions and the resulting outputs. The following table shows how different formats would be applied to different sample numbers.

FormatApplied to 0.934Applied to 1245.67
s934.2m1.24567k
,0.93421,245.67
,%93%124,567%
+,+0.9342+1,245.67
.3r0.9341250
.3n0.9341.25e+3
.0f11246
.1f0.91245.7
.1e9.3e-11.2e+3
$,.0f$1$1,246
  • Guides
    • Quick Start
    • Sharing Snippet Folders
    • Dynamic Commands
    • Date and Time
    • Autopilot
    • Forms
    • Formulas
    • Rules & Validation
    • Tidying Whitespace
    • Lists
    • Teams and Organizations
  • Tutorial Videos
  • Academy
    • Intro to commands
  • Showcase
  • Frequently Asked Questions
  • Formula Reference
  • Dynamic Commands
    • Using Dynamic Commands
    • {=} (Formula Command)
    • {click}
    • {clipboard}
    • {cursor}
    • {error}
    • {formdate}
    • {formmenu}
    • {formparagraph}
    • {formtext}
    • {formtoggle}
    • {if}
    • {import}
    • {key}
    • {link}
    • {note}
    • {repeat}
    • {site}
    • {snippet}
    • {time}
    • {user}
    • {wait}
  • Connected Snippets
    • Connected Snippets Overview
    • {image}
    • {urlload}
    • {urlsend}
    • {dbselect}
    • {dbinsert}
    • {dbupdate}
    • {dbdelete}
  • Command Packs
    • Capitalize
    • Gmail
    • LinkedIn
    • Randomize

About

Plans and Pricing
Sharing Snippets
Text Blaze for Business
Forms
Autopilot
Dynamic Commands
Command Packs
Text Blaze for Windows

Support

Get Started with Text Blaze
Contact Us
Documentation
Community Forum
Blog

Solution for

Teams
Customer Support
Recruiters
Education
Healthcare
Sales
Property Managers

Other

Privacy Policy
Terms of Service
Open Source Licenses
Affiliate
© 2023 Blaze Today Inc