OpenWGA 7.7 - TMLScript reference

TMLContext "this"
Method :

isTrue(name)

On object TMLContext "this"
Usage Returns if the contents of an item or WebTML variable is regarded "true"
Description

This is the TMLScript pendant of WebTML attribute istrue and tests if the contents of this variable or item may be regarded "true". 

The calculation depends on the version compliance of the design.

Before OpenWGA 7.2:

The item is teared as "true" when an item or variable of that name is defined and contains one of the following value:

    • A JavaScript or Java boolean value of true
    • The string "true"
    • A number of 1 or -1

OpenWGA 7.2 or later

The item is regarded as "false" if the value is

  • null
  • Boolean false
  • Empty String
  • Number 0
  • Unfefined
  • NaN

In all other cases the value is treated as "true".

The behaviour of this method therefore equals to the behaviour of JavaScript variables.

Parameters name (String):

Name of the WebTML variable or item to test

Return value (Boolean)
Allowed in script types
  • WebTML pages and normal WebTML actions
  • Master actions
  • TMLScript tasks in jobs
  • Content type events