This tutorial will show you how to create a basic table, model and view. It will take you through the basic steps of importing data, creating a model and creating a view.
Step 1: Importing Data
From the top menu, move the mouse over Actions, then navigate to Get Data and click on the Paste Data option.
This will result in a popup dialog box that looks as follows:
The default settings are set up as follows:
- Save to the current directory in the database – that is, we’re not doing a local save. If this is greyed out, then that’s okay and the tutorial will still work. However, you do not get a URL at the end that can be shared with others.
- Preview the table before saving
- Auto-type columns before saving. These will be seen in the preview.
- Assume the first row contains headers
- There is only one row of headers
- Save as ‘Data Sheet 0’
Next to the Data label is a grid. If you copy data from a spreadsheet program, you can paste it here. But you can also type values directly into the grid, which is what we’ll do in this tutorial.
Click in the top-left cell and type ‘Fruit’. Click in the next cell (or press the tab or right arrow key) and type ‘Quantity’.
Notice that the top row will become grey. This indicates that this row is now recognized as a header row. The ‘Header Size‘ parameter sets the number of rows that should be used to define the header. This is nearly always 1, but other values are accepted.
By clicking in the cells, or using the arrow keys, enter a few lines of fruit in the first column and numbered quantities in the second. For example:
Now click on the ‘Import Data’ option. Assuming that the ‘Preview’ and ‘Auto type’ options are left checked, then a preview of the table will show where column type is automatically detected.
The words ‘Text’ and ‘Number’ in the small box indicate the column type. The ‘0’ in the box next to ‘Number’ indicates the number formatting detected, which means whole numbers only. For example, ‘0.00’ would mean to show numbers with two decimal places. Type and formatting can be changed later. If the preview is not satisfactory, click cancel and change the options or values as needed. Otherwise, we can move on.
Click ‘Save’.
Close the confirmation box and you will see something like this: on the left, a navigation tree with a new table called ‘Data Sheet 0’ highlighted and on the right, an information table with the values that were entered.
If your account permits you to have your own folder in the database, then you’ll see your email address on the left. Under it, all the content you create and own will show below. Otherwise, you’ll see content under a folder called ‘Local’. This is your browser’s memory and is temporary. You can save items in Local (right-click on item or folder, download), otherwise, you will lose it if you navigate away. (Note that Actions → Get Data → File Import loads back saved items.)
When an information table is highlighted in the navigation tree on the left, the table contents show on the right. Above the table, a new set of menu options appears relevant to the item selected. In this case: Source, Model and More. If you move the mouse over any of these options, a submenu appears. Each submenu has an ‘Info’ option which, if clicked, will show a helpful summary of the options available and what they do. For example, if the Info option is selected under More, then a small panel is shown at the bottom left of the screen.
Let’s change the name. Under More click on the Rename option. In the navigation tree you’re invited to change the name. Let’s change the name to ‘Fruit Inventory’
When changed, the name change propagates as shown above.
Information tables can be edited in several ways: forms created, APIs and applications generated, etc. For this tutorial, we will not make any changes but go straight to creating a model.
Step 2: Create a model
A model is the equivalent to all of the equations in a spreadsheet. It is a sequence of functions (model steps) that operate on an information table. So, to create a model, we create a step. Subsequent steps can then be added to build up the model. A model step can be created from any information table or a previously created model step.
Let’s create a model step that sorts the Quantity column from high to low. Right-click on a data cell in the Quantity column, then hover over the Column Functions option, then over the Sort option and then click on the Descending option:
This will result in a new model being created in the same folder as the table. Note that on the left navigation tree a new entry appears: Model for Fruit Inventory. The tree also shows two steps, the data source used and the sort function.
In the middle, a graphical representation of the model is shown. On the right, the output of the highlighted step is shown.
Additional steps can be added to the model by right-clicking in the output table and selecting the next step to use. This way, complex models can be created.
Usually, the last step created is interpreted as the model output. There is an API model step that can also be used, enabling a model to generate multiple outputs.
For this tutorial, this is as far as we’ll go.
Step 3: Create a View
To create a new view, right-click in the navigation tree on the folder under which a new view is to be created (i.e. your email address or ‘Local’) and click on the Create New View option.
Lets create a view call ‘Inventory’. Enter this as a name and click the Create View button. Close the confirmation window by clicking on OK.
The new view will show up with the view designer on the right displaying an empty canvas.
Before doing anything, we need to tell the view designer which data sources we plan to use. In this case, it’s the model. We do this by dragging the model to the Data Sources box:
This results in a data source showing in the designer: the name of the model and then number 2. The ‘2’ means that this is step number 2, which was automatically determined and used. It has also become a component that we can use on the canvas.
Let’s add this table component to the canvas. Components can be added to the canvas by either clicking on them or dragging them to the canvas. So, do one of these to the ‘Model for Fruit Inventory 2’ component in Data Sources. Then move the mouse over the table in the canvas to reposition as needed with a click and drag action. Resize handles also appear that can be used as needed.
Now, let’s add a title to the canvas. From the components showing under ‘Common Items’, click on the Text component, or drag it to the canvas.
Drag it above the table and give it a title, such as ‘My Fruit Inventory’.
Congratulations – you have a new view. Your view automatically gets a dedicated URL, which you can obtain from the top menu from the Link option. Right-click to copy the address or just click to view. Only you can see this until you share it with others.
To add some interaction, let’s add a filter and a calculated field. Add a Checkbox select component and a Field component under the table.
You should get something like this:
Control components like these use data from a table column. When first placed, the first column of the first table is automatically picked. This happens to be correct for the checkboxes, but not for the Field component. We want to sum the numbers in the Quantity column.
To change this, start by selecting the Field component in the canvas. Selected items are outlined with a dotted box. Note also the option icons that show above. These change as needed as items or groups of items are selected.
Click on the database icon:
There is only one data source in this view, so that does not need to change. To change the column, use the dropdown to select ‘Quantity’. You’ll see the title in the canvas change from Fruit to Quantity.
Field components act on the entire column and the default is to show the number of unique values. We want to change this to sum up all values instead. To do this, click on the function icon and select sum:
The component changes to show the sum of values.
Now the view has some interactivity. Select items in the checkbox and the view changes:
The checkbox control is not active if nothing is selected. Otherwise, a blue dot shows. A right mouse click in the canvas shows an option to Clear All Filters. There’s also a component called ‘Clear Filters’ that can be added to the canvas for users.
Notice that changes are saved as you go.
And that’s it! Well done.
Summary
This tutorial took you through three basic steps:
- Importing Data
- Creating a Model
- Creating a View
As you progressed through these steps, I hope you saw some of the other capabilities this platform provides. Feel free to explore the available options:
- With the tables: try the editors. Add and delete columns and rows, change column types, use the form manager to create one or more forms.
- With models: try some other functions. Add an API step that you can name and use this in a view.
- With views: try some of the other controls or add a shape. A double-click on a shape either allows points to be modified or allows text to be added.
- With any item: view the item history and perhaps revert to a prior version.