Skip to main content
Skip table of contents

storeStringSet

Stores values of multiple variables into a document or another kind of File. They can be then later restored with restoreString or restoreStringSet.            

The values to be stored are defined with the prefix attribute. All variables in the variable context whose names start with that prefix are picked and then stored using their variable names as the storage keys.

Attributes

prefix

Required

Value type

EL-evaluated

Yes

String

Yes

Defines the prefix used to select the variables whose values to store. The resolved String should be at least one character in length.

format

Required

Value type

EL-evaluated

No

String

No

Defining a value for this attribute causes the stored Strings to be formatted into values of a different kind before being stored. Matching this format with restoreString's or restoreStringSet's parser allows more complex variable values besides Strings to be stored and restored back into values of their original types.

The following values may be used:

  • "json"
    The values are formatted into JSON. This allows various kinds of non-String values, such as Collections and Maps, to stored and restored successfully.  

  • "file"
    The values are base64-encoded. This allows File values to be stored and restored successfully.

  • Name of a Format
    The values are formatted with the named Format.

If left undefined, the values are converted into Strings if they aren't such already and stored.

storeTo

Required

Value type

EL-evaluated

No

File

Yes

The resolved File is where the values are stored. The File may be an Online template, an Office template or a PDF document.

If this attribute is not defined, the values are stored into the Online template or Office template in which this command exists in.  

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.