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 The following values may be used:
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.
<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.
<restoreStringSet prefix="edit_" readFrom="${pdf}">