We're coming to San Francisco Tech Week!
Learn more

Math variables

Use math variables to insert a random number in your functionsFunctions you can use in Boost.space Integrator - create, update, delete, get, search..

random

Returns a floating-point, pseudo-random number in the range [01) (inclusive of 0, but not 1).

Use the following formula to generate an integer pseudo-random number in the range [minmax] (inclusive of both, min and max):

math_variables_1.png

You may copy and paste the formula’s code into a field:

{{floor(random * (1.max - 1.min + 1)) + 1.min}}

Examples

Rolling the dice

Let’s say chatbot enthusiasts and such would like to create a dice game. They can employ the random variable to randomly pick a number, say between 1 and 6, and then message that number to a user in the respective Chatbot platform as a response.

  1. In the mappingMapping links the modules in your scenario. When you map an item, you connected the data retrieved by one module to another module to perform the desired action. For example, you can map the email address and subject lines from the Email > Watch emails module to Google Sheets > Add a row and create a spreadsheet of email addresses... panel, head over to the Math functions tab:
    math_variables_2.png
  2. Under the Math functions tab, select the floor functionFunctions you can use in Boost.space Integrator - create, update, delete, get, search..
  3. Insert the random variable in between the brackets followed by * (multiplication operator) and number 6.
  4. Add + (addition operator) after the bracket and number 1.
  5. Alternatively, you may copy and paste the formula’s code into a field:
    {{floor(random * 6) + 1}}

Random String/Text

This template demonstrates how to generate a string (text) of a given length composed of characters chosen randomly from a predefined set.