Blockpad supports tables that act like mini-spreadsheets inside of a document. You can use normal Blockpad formulas in the table, and reference values back and forth between the table and report.
You can use all of the Blockpad formula features inside of a table, including units, naming values, and creating functions.
To reference values in the table, you can use clicking like in a spreadsheet or any other referencing method. Notice the table name appears in front of the value. This is because a table is a frame that contains values.
You can change a table's name so that a useful name appears in the formula.
Referencing works both ways. You can reference document values from inside a table too.
You can also have a word processor style table cell, called a multiline cell. Multiline cells act a lot like a document, so you can do all the same things, like format text, equations with math notation, and more.
(To change a cell width, you can use the properties window or show rulers (View>Show Rulers) and drag the borders of the ruler.)
In a report, you may often want all of the cells in a table to be multiline. Do this automatically by selecting word processing mode when you insert a table.
Fields act like spreadsheet cells, but in a document. You can have formulas in them like a dynamic equation, but the formatting is more similar to a spreadsheet cell.
In Blockpad, you can use functions inside of formulas/dynamic equations, just like in a spreadsheet. There are a lot of built in functions, but it's also easy to make your own functions.
Built-in functions are stored in the Blockpad library, but using them is as simple as typing them in, like a normal spreadsheet. You can view all of the built in functions through the math, text, logic, and lookup libraries.
There are basic math functions.
Functions will track units.
Functions that require angles are unit sensitive.
There are logical functions.
The expression above uses the if() function. It's shown in the display form.
A quick note on logical functions: to test if something is equal, a double equals sign is used (==).
There are also text functions and lookup functions for use with spreadsheets and tables.
Custom functions are simple and accessible in Blockpad - you can create them in a normal formula.
To define a function, specify the function name, the function variables, and the calculation. Let's look at the sample below.
In the first dynamic equation, "hypotenuse" is the function name, "A" and "B" are the function variables, and Sqrt(A^2 + B^2) is the calculation. Now hypotenuse() is defined as a function, and you can use it in calculations. In the second equation, hypotenuse is used as a function and calculates the inputs 3 ft and 5 ft.
You can also think of making a function in terms of calculating a value.
First, write out the formula as if you were calculating a single value. Then, replace change the value or values in the formula to parameters by renaming them and putting them in parentheses after the name.
Using a defined function is very similar to referencing a value: clicking, copy reference, or typing the name in all work. Then proceed like a normal built-in function, with parentheses and values for the function variables.
You can use values in the document to help define a function, just make sure the names don't conflict with the parameter names.
In the example below, the density value is part of the function. If you change the density, then it changes the function and thus the output as well.
You can also use your own defined functions inside of a custom function.
This makes sense to do if a function you're writing starts to get too long. You can write part of it in one function, then use that function in the final one.
A few things to remember:
There is another way to define a function, without giving it a name.
To do so, type the function variables in parentheses, an equals sign with a greater than sign, and then the calculation. To use this function, you can use copy reference or clicking and Blockpad will auto-generate a name. For single variable functions, the parentheses can be dropped.
You can define functions like this in a spreadsheet cell, and then reference the cell to use the function. Using a function like this can feel a little funny. It's not particularly recommended, but it's mentioned here for understanding.
You can also name functions while defining them like this. Just type the name and equals sign before the in-line function, like you are naming a value.
To use a solver section, type in dynamic equations that use new variables. You can reference already named values like normal. When there's enough information to solve for the variables, the answers appear at the bottom. You can reference these answers the same way you reference other values in a document.