Skip to main content
Skip table of contents

restoreStringSet

Restores multiple Strings previously stored with storeString or storeStringSet. All stored strings whose names start with the specified prefix are restored into variables into the variable context. Each created variable's name is the same as its name as a stored string.

Each found string can optionally be parsed into another kind of value with a parser. It's the same parser for all strings, so if there's a need to restore the strings as various kinds of objects, use multiple restoreStringSet commands (with stricter prefixes) or restoreString commands using different parsers.

At the moment, this command is able to restore values only from PDF documents. For DOCX, PPTX, XLSX and Dynamo Online template files, please use restoreString instead.

Attributes

prefix

Required

Value type

EL-evaluated

No

String

Yes

Stored Strings with names starting with the resolved String are restored. The resolved String should be at least one character in length.

parser

Required

Value type

EL-evaluated

No

String

No

Defining a value for this attribute causes the restored Strings to be parsed into values of a different kind. This should be matched with the parser of the storeString or storeStringSet that stored the strings.

The following values may be used:

  • "json"
    The restored Strings are parsed as JSON, resulting in a Map or a Collection containing more values as defined by the JSON content.

  • "file"
    The restored Strings are parsed into Files.

  • Name of a Parser
    The restored Strings are parsed with the named Parser into value of the kind that the Parser produces.

If left undefined, the restored Strings will appear in the variable context as just Strings.

readFrom

Required

Value type

EL-evaluated

Yes

File

Yes

The resolved File value is where the Strings to be restored are expected to be stored in. Unlike with restoreString, with this command the File has to be a PDF document.

Examples

The storeStringSet and restoreStringSet commands are common components of templates that allow users to re-edit already produced documents. An important part of that functionality is to have all the values of the editable areas stored into the produced PDF document, so that the editable values can then be brought back into the editor when re-editing. Storing all the editable values is simple with storeStringSet by giving all the variable names of the editable areas a common prefix, such as "edit_". This also allows the number of editable areas to be changed without any changes needed in the logic.

CODE
<storeStringSet prefix="edit_" storeTo="${pdf}">

A single restoreStringSet with a matching prefix will then bring all the values back when the Flow is run again to give the editable areas their correct values.

CODE
<restoreStringSet prefix="edit_" readFrom="${pdf}">
JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.