HomeGuidesRecipesAPI
HomeGuidesAPILog In

File Selection - Question Type

The File Selection question type allows users to upload files to the form and the Content Library. This question can be used to gather existing files for people in other workflow steps to view, insert the uploaded files in the document output or other actions or add the files to the content library for future use.

Document Preparation

Standard or selection placeholders can be used throughout the document to specify where the content items are to be inserted.

Usage

From the toolbox, drag and drop a Content Library question onto a page, section column or tab and set the question’s properties as below.

PropertyDiscription / Examples
Content TypeSelect the type of content that will be uploaded or selected from a drop-down list. Options are listed below.
Document FragmentOnly accepts Doc and Docx files
ImageOnly accepts image files
TextAccepts text, very similar to a text field
AttachmentAccepts all file types
AudioOnly accepts audio files
Display TypeSelect if the display and functionality of the question. The options will depend on the display type selected:
Search - The content library can be searched for existing items to use
Upload - Files can be uploaded in produce
Search or Upload - Allows the option of Search or Upload
Attachment NameGives the file an assigned name upon generation.
Allow Add To Content LibraryAllows the items which are uploaded to be inserted into the content library.
Content FolderIf Allow Add To Content Library is selected, a content library folder will need to be selected to insert the file into.
Restrict By FolderSpecify a folder in the content library to search.
Allow EditAllows users to edit existing text files inside the content library. Visible if select: Content Type 'Text', Display Type 'Search' or 'Upload and Search'.
Valid ExtensionsSpecify the file extensions which are valid to upload. Visible if 'Upload' is selected
529

Receiving uploaded file contents

Actions and data sources and potentially other connectors can reference the contents of a file uploaded to a form.

To reference the file contents, add the following to the end of a reference to the file upload question:

".hex"
".base64"

For example, if your upload question is q1, the reference will be [q1.hex] or [q1.base64].

To check the name or size of the uploaded document, use the following:

".filename"
".filesize" (Note: This was introduced in v9.7.6)

📘

Note

When there has been no file uploaded to the question then the result is a blank string.

Restrict attachment uploads by Document type

In Design, Create or open a Project with at least one File Selection question.

Click to select File Selection question and the properties tab will show.

333

The "Valid Extensions" field accepts a comma-separated list of values that define what type of documents can be uploaded to Produce. For example, if you enter: ".pdf, .doc, .docx", then only PDFs and Word documents can be uploaded as the attachment. Therefore, In produce if you try to upload a file other than any of those defined in the "Valid Extensions" field, the following error message will be displayed:

623

Defining attachment name in Design

Add a FIle Selection question to your project.

In the "Attachment Name" field, enter the relevant file name for the attachment when generated.

Save.

337 284

📘

Note

The Attachment Name field accepts question references. This can be used to make your attachments name more descriptive.