storeString
Stores a variable value into a document or another kind of File. This stored value can be later restored with restoreString or restoreStringSet.
If you wish to store several values, instead of several storeString
commands you may be able to make use of storeStringSet instead to reduce the command count.
Attributes
key | ||
---|---|---|
Required | Value type | EL-evaluated |
Yes | String | Yes |
Defines the name given to the stored String in the File. When this stored String is restored with |
value | ||
---|---|---|
Required | Value type | EL-evaluated |
Yes | Any | Yes |
The resolved value of this attribute is the value stored. If the |
format | ||
---|---|---|
Required | Value type | EL-evaluated |
No | String | No |
Defining a value for this attribute causes the stored String to be formatted into a different kind of value before being stored. Matching this format with The following values maybe used:
If left undefined, the value is converted into a String if it isn't one already and stored. |
storeTo | ||
---|---|---|
Required | Value type | EL-evaluated |
No | File | Yes |
The resolved File is where the value is stored. The File may be an Online template, an Office template or a PDF document. If this attribute is not defined, the value is stored into the Online template or Office template in which this command exists in. |
Examples
The storeString
and restoreString
commands are most commonly used to have a PDF file produced by the logic to act as a storage for data related to the life cycle of whatever process the PDF is part of. In this model storeString
stores something into the PDF, such as selection the user did during the Flow. The PDF is then saved somewhere where the Flow can find it on the next run.
<storeString key="selectedAttachment" value="${selectedAttachmentId}" storeTo="${exportedPDF}">
When the Flow is run again, it finds the PDF and restoreString
reads the selection from it, allowing the logic to make use of this data, such as have the past selection to be pre-selected on a Screen.
<restoreString var="selectedAttachmentId" key="selectedAttachment" readFrom="${existingPDF}">