Examples¶
This documentation currently contains three easy-to-follow examples of JavaScript scripts.
For each example, you'll need a special base structure so that you can just copy&paste the scripts into SeaTable and run them.
If you don't want to recreate the tables, here are two bases containing the tables required for each example, depending on whether you want to recreate the scripts yourself or you prefer them to already be present:
Once downloaded, you can easily create a base from the DTABLE file.
Add rows¶
This script demonstrates how to add rows to record monthly repetitive expenses in a ledger.
Calculate accumulated value¶
This script computes an accumulated value (adds the value of the current row and the previous rows), similar to the Calculate accumulated value operation from the data processing menu.
Statistics¶
This script computes, from a list of clocking times, daily clock in (earliest clocking) and clock out (latest clocking) times for each day and staff member.