OpenWGA 5.4 - TMLScript reference

TMLContext "this"
Method :

this.itemList([type, ] itemname)

On object TMLContext "this"
Usage Returns the value of an item or WebTML variable as list
Description This is a variant of this.item() which instead of single values will always return lists. If it is used to retrieve a single value field it will provide it as a list with a single element.

Otherwise the behaviour of this method matches that of this.item().
Parameters type (String, optional):
Source of the field to retrieve. Possible values
"content" or omitted: Items of the context document or WebTML variables
"profile": The users personalisation profile
"portlet": The configuration of the current WebTML portlet
"tmlform": Fields of the current WebTML form

itemname (String):
Name of the field to retrieve
Return value A list containing the values of the field that was retrieved. An empty list (size=0) if the field was of value null or did not exist.
Allowed in script types
  • WebTML pages and normal WebTML actions
  • Master actions
  • TMLScript tasks in jobs
  • Content type events
Examples