On this Page

    domObj.getTag

    (Merge only) 

    The getTag function allows your script to get a previously set tag (see domObj.setTag). That setting may have occurred by script or via the Design UI.

    Syntax

    domObj.getTag(tagName[, driver])

    Parameters

    tagName is either a literal string or a variable that identifies the sought-after tag.

    driver is an optional printer configuration file designation used when setting PRT-specific parameters.

    Background

    What are the valid settings? Check your PRT files, especially in the barcode section. In Design, when you select an object and use Design's Format > Object Tags... menu item you will see a list of any existing tags. You can add new tags if you like. Tags added at Design time are saved in the XATW. Tags added via script during Merge are not -- Merge never writes out the XATW.

    The getTag syntax is simply this.getTag(tagName[, driver]) where tagName is either a literal string or a variable that identfies the sought after tag.

    As of 3.1.001.03, there is a _parser.parms(string) function for scripts that run outside of Merge and are reading the XML of the XATW file. It parses the names and values that were set for the "tags" at Design time or by means external to DocOrigin processes. Generally, this is used for value-added packages that have their own set of tags to manage.

    Returned Value

    The string value of the chosen tag.

    Old names

    Before 3.1.001.08 these functions were called setParm and getParm. Those names still exist as synonyms for backwards compatibility purposes. For the technically curious, you can see the Design UI generated tag names and values for an object in its <parms> ... </parms> element in the XATW.

    See Also

    _parser.parms