A LabVIEW Seatable Interface

A LabVIEW Seatable Interface

Jun 23, 2024

Seatable is an excellent product that allows users to build LowCode apps for web and mobile easily. Somewhat similar to Airtable it has few distinct features, the SaaS fee is very reasonable for private users looking to automate tasks, like I did with family budget, and offers a private on prem installation, which is a good thing to have if you need to keep your data local and fully owned.

Unfortunately, a LabVIEW-SeaTable API, even a partial one, didn’t exist—until now

I took on the task of creating a simple tool for people who want to push data from LabVIEW apps to the SeaTable cloud. It also serves as a teaching tool for web API in LabVIEW. The journey wasn’t without its challenges, as the HTTP Client Palette has some quirks and wasn't easy to work with so providing a working example in a real case seemed a good thing to do.

Why This API?

Seatable is all about managing data in the cloud, LabVIEW is all about data acquisition, processing visualization and control, creating a communication channel between the 2 felt just natural. The second main goal was providing a comprehensive example of how HTTP Client Vis works with a reasonably well documented API .

While this is not a commercial product, meaning I may not be able to offer support, upgrades, or bug fixes, significant effort went into this work, and I believe it holds value for the user, both as a simple tool to move data from LabVIEW as an example for HTTP API in LabVIEW. Thus, the example and code will be downloadable for a small €10 fee.

Functionalities Provided

Authorize to Base with Web API Token

the first thing to do is to authorize to the base and get the base info (json string) using the web api token created from your seatable account.

List Rows of a table

get a list of rows in variant format of a specific table. This Vi currently does't implement a "view" selection thus is only acting on the default view.

Append new rows

Provided the column name exist in the table new rows with new data get pushed into the table.

List available columns in a given table and view

We can get a list of available columns and associated types

Create new columns

new columns can be created as well, only checkbox and text type are supported currently but adding more types should not be difficult.

Update Rows

Existing rows can be updated modifying or adding content accordingly to the available columns.

Deleting rows

Direct deletion is not implemented due to limitations in the DELETE.VI. Instead, I’ve added a “mark for delete” column with a checkbox. You can use a SeaTable automation to delete marked rows daily.

Upload Files

Finally is possible to upload files. This is one of the best feature of Seatable, a cell can actually "contain" links to mulptiple files stored in a could storage associated to your account. This makes the Seatable app incredibly handy. Currently I've been able to only make the api works with text files, I tried binary but the upload gets corrupted. This is again something I wish to make better in future but I may not find the time and given the "example" scope of the API I preferred to publish it in the current form.

Save for later

if you are reading this content on a mobile device you can send this article to your email using this link

MAIL TO ME

DOWNLOAD

You can download the project here. The project includes a Pdf to start your own Seatable Account and upload a dtable example. The dtable example is included as well for upload to your newly created Seatable account and start using the API immediately.

Dependencies

JKI JSON by JKI - Toolkit for LabVIEW Download

OpenG Variant Library by OpenG - Toolkit for LabVIEW Download

HTTP Client Vis - NI LabVIEW Data Communication Palette

VIDEO

you can look at a quick video that shows some of the capabilities at this link

Text of the article and Labview Code worked on my own.
Debugging of the HTTP replies done with ChatGPT-4o.
Picture on top of the article generated with ChatGTP-4o

Enjoy this post?

Buy Filippo Persia a coffee

More from Filippo Persia