OpenWGA 7.2 - TMLScript reference

WGA
Method :

alias(value, aliasString)
alias(value, aliasList)

On object WGA
Usage Converts a value to an alias value
Description

This is a convenience method to reproduce the functionality of <tml:item> attributes aliases/aliasesitem (or <tml:input> attributes options/optionsitem) in TMLScript.

Given a value and aliases - either provided as alias string or a list - the matching alias to the value is returned. If no alias matches the raw value is returned.

Parameters

value (String):

The string value to match to an alias

aliasString (String):

A string containing comma-separated alias definitions, dividing alias and value via pile "|" symbol, just like usual on attribute aliases from <tml:item>

aliasList (List of strings):

A list containing alias definitions, dividing alias and value via pile "|" symbol, just like usual as item value for the item given to attribute aliasesitem from <tml:item>

Return value A matching alias or the raw value if nothing matched (String)
Allowed in script types
  • WebTML pages and normal WebTML actions
  • Master actions
  • TMLScript tasks in jobs
  • Content type events