Introduction

There are situations, which are much easier to solve by coding. As Tabidoo is used for advanced solutions, there is a possibility to add some JavaScript to its behavior.

Tabidoo is a great platform, which is used mainly without any need to write a single line of code. However, there are situations, which are much easier to solve by coding. As Tabidoo is used for advanced and customized solutions, there is a possibility to add some JavaScript to its behavior.

You can use scripting in these situations:

  • You need to prefill a computed value for a new line.
  • You need to hide/show inputs during form editing. Based on inserted values.
  • You need to enable/disable inputs during form editing. Based on inserted values.
  • You want to do an advanced validation, and show messages based on current data.
  • You need to create a record in another table, after some kind of changes.
  • You want to call some API after saving.
  • ...

Even the scripting is very simple with Tabidoo, it is much easier in case you know something about JavaScript ;)

Basics

  • The intellisense is accessible after pressing Ctrl+Space
  • When you type doo. you receive the list of the next functions.
  • A scripting language is JavaScript. Use the version supported by the browser you plan to use.

Scripting in the Table definition menu


Encrypted scripts

In some situations, you don't want anyone to be able to read the script. You can place tokens there, sensitive data, you publish it to Templates but you do not want the content to be visible...

Then, you can encrypt the script.

In this case:

  • Only the author of the script is able to read it.
  • The script is never sent to a browser.
  • The script can run only on the server.

So, the script will not run, when you use it on client side - button click trigger etc.

You can use this feature in Scripting extensions or Workflow action.

Scripting Tips

In case, you are not sure, how the model object looks like or what the value of a variable is, check the value in the developer console of the browser

console.log(doo.model);

Or you can debug your JavaScript step by step and check values of variables and so on in the developer console of the browser using the debugger command in your code (be sure to delete it when done :))

debugger;

You can open the developer console by pressing F12 in Chrome/Edge browser or CTRL+SHIFT+I in Opera browser and similarly in other browsers.