Scripts

Each Library may include any number of scripts — pieces of automated code that is going to be executed on a certain event. Using scripts, you can add complex calculations, add, update or edit the entries, change the data as it is needed.

There are two types of scripts available in Memento Database: Triggers and Actions. The main difference between them is the activator: when the script is executed. For Triggers, you need to define an event which will launch the script like Editing or Updating an entry, Opening the Library, etc. Actions are activated by clicking the relevant icon on the toolbar of the Library. The more Actions you add, the more icons will be shown for a Library user.

To add or review the previously created scripts, open the Library, tap the burger icon at the top-right corner of the window and choose Scripts option. Here you will be able to add a new trigger or action using Mobile: Add button icon or adjust the Permissions for scripts by clicking the relevant icon at the top-right corner of the window:

Android: Scripts

  • Libraries toggle and Available libraries list allow you to choose to the tables the scripts will have access to
  • Read files option allows you to set whether the scripts will be able to read from files
  • Write files option allows you to set whether the scripts will be able to modify external files
  • Network option allows you to set whether the scripts will be able to execute HTTP requests

The syntax used in Memento Database is similar to JavaScript. There are numbers of special functions and objects created especially for working with Libraries and Entries. Visit wiki to find the detailed information about syntax features or look through the examples.

Was this article helpful?

Related Articles