Hey Text Blaze community
It's week 2 of the Text Blaze Feature of the Week where I post weekly about cool features to showcase all the awesome stuff you can do with Text Blaze
Text Blaze Feature of the Week #2: Formulas
The formula command is one of the most versatile features that Text Blaze offer. This is because there are essentially limitless ways you can use them. Formulas help you with dynamic math, creating variables, and utilizing them in your snippets.
Three things to know about formulas:
- Formulas have the same syntax as other commands, however, there are two settings (positional and format) that make formulas different.
- You can use formulas to interact with the name setting in forms.
- The Formula Reference is extremely helpful if you want to include formulas in your snippets.
Note: Put the name of the variable before the formula command's = sign to create variables that can be reused in your snippets.
The snippet below is an example of how to do it.
Hey {formtext: name=name; cols=10}!
I hope you're doing well. Just wanted to check in and see if you wanted to meet up soon. Let me know!
Looking forward to hearing back from you, {=name}.
The snippet below is an example of how you can use formulas to interact with forms (as well as format your results).
Hello customer,
You ordered {formtext: name=quantity; default=5; cols=5} units, which cost ${formtext: name=price; default=5; cols=6} each.
This brings your total cost to: {=quantity*price; format=$,.2f}.
The snippet below shows how you can use formulas to interact with formmenus as well as dates.
{formmenu: name=window; Weekly; Monthly; Yearly; cols=15}
{weeks=1 if window=="Weekly" else (4 if window=="Monthly" else 52.18)}
total cost is {=weeks*20}
What do you think should be the next feature of the week? Let me know by commenting here or emailing me at dylan@blaze.today