OpenWGA 7.6 - TMLScript reference

WGA
Method :

getLookupKeys(lookupTable)

On object WGA
Usage Returns the keys of a Lookup table as List
Description

Use this method if you want to iterate over all elements of a lookup table. Retrieve the keys and then use table.get() for each key to return the corresponding value.

For backward compatibility there still is a global function "getLookupKeys()" available whose use is discouraged since OpenWGA 5.3.

Parameters table (Lookup table)
The table
Return value List of table keys
Allowed in script types
  • WebTML pages and normal WebTML actions
  • Master actions
  • TMLScript tasks in jobs
  • Content type events
    portletevent
Examples Iterating all elements of a lookup table:

var keys = getLookupKeys(myTable);
for (let key in Iterator(keys)) {
    var value = myTable.get(key);
    log.info("Element with key " + key + " contains " + value);
}