OpenWGA 7.6 - TMLScript reference

TMLContext "this"
Method :

hdb()

On object TMLContext "this"
Usage Returns a  WGAPI HDB object for the application in context
Description

The HDB database object is a tool to use a OpenWGA content store as a simple hierarchical database for data storage.

To retrieve the HDB object for a special database key use the method WGA.hdb() instead.

Parameters
Return value A HDB database object to manage hierarchical data in the given database (HDB API object WGAPI HDB object)
Allowed in script types
  • WebTML pages and normal WebTML actions
  • Master actions
  • TMLScript tasks in jobs
  • Content type events
Examples A script using the HDB API to get or create a storage document "customers" and to create a content document below it:

var s=hdb().getOrCreateStorage("customers");
var doc=hdb().createContent(s, "Customer X", tmlform);