December Development Update

Please note that we are changing our update naming and calling this update the "December Update" rather than the "November Update". This change is to better align with when these updates are actually published.

This month we want to highlight new functions we've added to the Text Blaze formula language. Text Blaze formulas, like formulas in Excel, allow you to create dynamic snippets.

:mag_right: Search through text with Contains() and Search()

The new contains() function searches through text and tells you whether or not another piece of text exists within it.

The search() function is similar but rather than just telling you whether text contains the search text, it gives you its position.

Base text:
{formparagraph: default=This is the text we will search through; name=haystack}
Search text:
{formtext: default=we will; name=needle}

Does the base text contain the search text? {=contains(haystack, needle)}
The position of the search text in the base text is {=search(haystack, needle)}

Note that both these function are case sensitive. You can combine them with the lower() function to do case insensitive searching.

:chart_with_upwards_trend: Summarize lists with Sum(), Average() and Median()

We've added three new functions to quickly get summaries of numeric lists. We've also updated our existing max() and min() functions to allow you to use them on a list.

Data: {formtext: default=10, 16, 4, 20, 17; name=values} {list=split(values, ",")}

Average: {=average(list)}
Median: {=median(list)}
Sum: {=sum(list)}
Maximum Value: {=max(list)}
Minimum Value: {=min(list)}

:card_index_dividers: Understand your data with IsNumber(), IsList(), IsBoolean(), IsOdd(), and IsEven()

Sometimes, you need to know what type of data you are dealing with. This can be used to validate user inputs. For example, if the snippet user should enter a number, you can confirm that they have done so:

Enter a year: {formtext: default=2030; name=year} <-- try entering something like "oops" here

{if: isnumber(year)}That year is {=year - {time: YYYY}} years away{else}{error: That's not a number!}{endif}

Here is an example of all the new functions we've added;

{formmenu: 1; 2; 3; yes; no; dog; cat; [1, 2, 3]; name=value}

Is a number: {=isnumber(value)}
Is an odd number: {=isnumber(value) and isodd(value)}
Is an even number: {=isnumber(value) and iseven(value)}
Is a boolean (yes/no): {=isboolean(value)}
Is a list: {=islist(value)}

:1234: Display numbers in a different Base()

Note: This one is quite techy, so feel free to skip over.

Typically we use base-10 numbers. However, in some specific cases you may want to display numbers in a different base (e.g. binary). The new base() function makes this possible;

Number: {formtext: name=number; default=80032}

In Base-10: {=base(number, 10)}
In Binary: {=base(number, 2)}
In Hexadecimal: {=base(number, 16)}

We can also pad the length of numbers:

Base-10: {=base(number, 10, 10)}
Binary: {=base(number, 2, 32)}
Hexadecimal: {=base(number, 16, 8)}

You can learn more about what is possible with Text Blaze formulas here.

As Always...

If you have any questions feel free to post to our Question and Answer community forums. If you have anything you would love to see in Text Blaze, please suggest it in the Features Idea section.

More toys to play with! :grin:

Good stuff. Any updates on integrations with other platforms?

We're making great progress on the integrations.

Here's a sneak peak at a snippet that uses the integrations to dynamically pull data from the HubSpot CRM system and then uses Google Maps to generate a map basic on a customer's information.

1 Like

Nice :slight_smile: