OpenWGA 7.11 - TMLScript reference

Method :


On object CollectionResult
Usage map(function) takes a JS-Function as parameter. This function is called for each result entry with the TMLContext as parameter and must return some value. The return value of map() is a list of all mapped values.

The given function is called for every document that is retrieved from the collection and receives it as a TMLContext parameter.


function (Function):

A JavaScript function

Return value List of mapped values.
Allowed in script types
  • WebTML pages and normal WebTML actions
  • Master actions
  • TMLScript tasks in jobs
  • Content type events
  _opts = WGA.nav().children().map(function(doc){
      return doc.TITLE + "|" + doc.KEY
<tml:input name="..." type="select" optionsitem="_opts"/>