On this Page

    _resolve

    String substitution

    Syntax

    _resolve(text)

    Parameters

    text is a text string with all manner of placeholders to be replaced. These include Auto/Embedded Fields, % variables, and $X folder mappings.

    Returned Value

    A new string with substitutions done.

    Description

    This routine is a script equivalent of the auto/embedded Field substitution available in normal text labels. If used in the context of Merge, i.e. in the script in a Form, where there is a Document DOM available, _resolve looks for substrings of the form [fieldname] and replaces them with the Field's value from the current document. This function uses the same substitution logic, so if the text between the left and right square brackets is not a known name the text and square brackets are left unchanged in the text string. Unlike _mergeEmbedded, in any context (Merge, RunScript, or Job Processing scripts), _resolve will also do substitution of the % variables (typically date elements) that is done for output file names. See any PRT file. Further, any $X folder mapping will be substituted as well. The string is not presumed to be a file name, so no replacement of characters that are invalid for file names is done. Also, backslashes are not converted to forward slashes. By contrast see _file.resolveName.

    Examples

    In a Summary Section page, one might use:

     report._value = _resolve("The report for branch [branch] is in file: $T/[branch]_%U.pdf");

    See Also

    Auto/Embedded Fields
    _auto
    _file.resolveName
    _mergeEmbedded