OpenWGA 7.9 - 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 The CollectionResult for further chaining.
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"/>