Skip to main content
Skip table of contents

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 tomake 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. Whenthis stored String is restored with restoreString, its key value has tomatch this command's key value.

value

Required

Value type

EL-evaluated

Yes

Any

Yes

The resolved value of this attribute is the value stored. Ifformat is defined, this value is formatted before being stored, otherwise it is storedas is. 

format

Required

Value type

EL-evaluated

No

String

No

Defining a value for this attribute causes the stored String tobe formatted into a different kind of value before being stored. Matching this format withrestoreString's parser allows more complex variable values besides Stringsto be stored and restored back into values of their original kinds.

The following values maybe used:

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

  • "file"
    The value is base64-encoded. This allows File values to be stored andrestored successfully.

  • Name of a Format
    The value is formatted with the named Format.

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 bean 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 PDFfile produced by the logic to act as a storage for data related to the life cycle of whatever process thePDF is part of. In this model storeString stores something into the PDF, such as selection theuser did during the Flow. The PDF is then saved somewhere where the Flow can find it on the next run.

CODE
<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.

CODE
<restoreString var="selectedAttachmentId" key="selectedAttachment" readFrom="${existingPDF}">
JavaScript errors detected

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

If this problem persists, please contact our support.