OpenWGA 5.4 - TMLScript reference

TMLContext "this"
Method :

this.metaList([type,] metaname)

On object TMLContext "this"
Usage Returns the value of a metadata field as list
Description This is a variant of method this.meta() which always returns lists. If this method is used to return single value metadata fields it will return the value as a single element inside a list. If an empty metadata field is retrieved where this.meta() would return null) this method retuns an empty list of size 0.

Otherwise the behaviour matches that of method this.meta().
Parameters type (String, optional):
Type of the retrieved metadata field. See WebTML metadata fields for possible values. Defaults to "content".

name (String, optional):
Name of the retrieved metadata field. See WebTML metadata fields for possible values.
Return value List of metadata values
Allowed in script types
  • WebTML pages and normal WebTML actions
  • Master actions
  • TMLScript tasks in jobs
  • Content type events
Examples Retrieving metadata field "attachments" which lists the filenames of attached files on the current context document:
this.metaList("attachments")


Retrieving the username aliases of the current user on a database session:

this.metaList("db", "useraliases")