Backend Function Interfaces
  • 05 Apr 2022
  • 1 Minute to read
  • Contributors
  • Dark
    Light

Backend Function Interfaces

  • Dark
    Light

Within Backend Functions you can access the runtime environment on the server, which holds lots of informations. Either from frontend tracked documents, the actual runtime environment, a local storage on your server and many more. Here is a reference of all functions available to empower your Backend Functions.

Read First: Here is the manual on Backend Functions with all the fundamental information you need to get started.

List of Elements

  • Local Storage Read
  • Local Storage Write
  • Log
  • Access Frontend Variable
  • Access Document Properties

Function Interfaces

Local Storage Read

Use this function to access the local storage to read a value from it.

await this.storage.read("storage_name");

Input Parameter:

  • storage_name String: the key on which the value to be read is to be found.

Return Parameter:

  • Object – the value found on the given key or false if nothing is found.

Local Storage Write


this.storage.write("storage_name", "storage_name", 1720000000000);

Input Parameters:

  • storage_name String: the key on which the value to be read is to be found.
  • storage_value String: the value to be saved on this location.
  • timestamp Integer: a lifetime span definition in millisec format.

Return Parameter:

  • void no value is returned.

Log

Logs from Backend Functions will be displayed in the preview panel. To log a value you can use the following function call.

this.log("my log string");

Input Parameter:

  • message String: a string value to be logged.

Output Parameter:

  • void – no value is returned.

Access Frontend Variable

You can reference back values that were calculated in a frontend variable.

this.getFrontendVariable("window_location_href");

Input Parameter:

  • variable_id String: they id of the frontend variable (that is displayed in the frontend variable edit screen)

Output Parameter:

  • Object: the current content of the referenced frontend variable.

Was this article helpful?

What's Next