Use Google to find help fast. For example, search on "xpressdox choosefromlist".

The SetSavedDocumentFolder Command

The SetSavedDocumentFolder Command

Classic Usage

In addition to forcing the saving of documents and naming them using the SetSavedDocumentFileName command, the template author can use the «SetSavedDocumentFolder» command in the template to have control over where the documents are stored.

Here is an example:
«SetDocumentSaveFolder(Documents\<AccountNumber>)»

If the DocumentSaveFolder set in this way is a relative folder, as with this example, then the folder configured into the Document Save Folder is prefixed in order to arrive at an absolute folder path. This example will use a Documents folder which is at the same level as the template.
«SetDocumentSaveFolder(.\Documents\<AccountNumber>)» will use the Documents folder at one level below the template folder.

Note the <> characters around ‘AccountNumber’ – these indicate that XpressDox must extract the value of the ‘AccountNumber’ data element captured for the template, and insert that value into the folder name, giving a result, in this example, of ‘Documents\A0001′ (assuming the ‘AccountNumber’ captured was ‘A0001′).

<WindowsLogonUser> is a system specified value and refers to the Windows logon name of this user. It can be included in the «SetDocumentSaveFolder()» command. An example would be:
«SetDocumentSaveFolder(Documents\<WindowsLogonUser>\<AccountNumber>)» the result of which would be ‘Documents\Melanie\A0001’.

The saving of documents can also be defined in the Configuration which would mean that the template author would not need to use this command on each template. Any Configuration settings which determine the file path of the document would be overwritten by this command on the template.

Function-like Usage

With effect from version 5.3, the command can be coded as if it were a function. The above would then be rendered:

«SetDocumentSaveFolder(concat('Documents\',WindowsLogonUser(),'\',AccountNumber))»

or even

«SetDocumentSaveFolder(concat('Documents\',WindowsLogonUser(),'\',GetValidFileName(AccountNumber)))»

Leave a Reply