OpenWGA 7.11 - TMLScript reference

Method :


On object App
Usage Returns a TMLScript global that is available for the current app

This method allows to retrieve TMLScript globals with their name as method parameter. It can retrieve normal globals just like globals of design scope.

Normally you access TMLScript globals just by specifying their name in TMLScript code, without using any method. However there are some situations where you will need to use this method instead. For example:

  • If you want to programmatically compose the name of the global to retrieve. For that you can construct the name simply as a string and then and give it to this method as parameter.
  • If you want to retrieve a db global that belongs to another design than your current one, so you are not able to access it normally.
  • If you need access to a managed global registered for a different App.

name (String):

The name of the global

Return value The TMLScript global that is available to the current design under the given name or null if there is none
Allowed in script types
  • WebTML pages and normal WebTML actions
  • Master actions
  • TMLScript tasks in jobs
  • Content type events

Retrieving a TMLScript global "Tools" from the app "intranet", which may not be visible to my current code as it is a "db global".

var tools ="intranet").getGlobal("Tools");