Defines how one or more attachments can participate in the form. When present in the form, the user has the ability to upload an attachment specific to the form element.

Referenced by: formGroupElement, formInfo

Properties

PropertyDetails
allowUserRenameDetermines whether the user renaming an attachment is allowed.
attachmentKeywordA string to identify the attachment(s). When a file is attached using the form, this property is used to set the value of the keywords field for the attachment. When a form is displaying existing attachments, this property is used to query attachments using an exact match on the keywords field.
descriptionA string that describes the element in detail.
displayFilenameDetermines whether the file name should be displayed. Default is false.
editableExpressionA reference to an Arcade expression that returns a boolean value. When this expression evaluates to true, the element is editable. When the expression evaluates to false the element is not editable.
filenameExpressionDetermines the name of a new attachment. If not specified, a unique name will be generated using the attachmentKeyword and the current timestamp when attachment is added.
inputTypeThe input user interface to use for the attachment.
Must be one of the following values:
labelA string value indicating what the element represents.
maxAttachmentCountDefines the maximum number of attachments allowed for this element. If not specified, there is no maximum number required.
minAttachmentCountDefines the minimum number of attachments required for this element. If not specified, there is no minimum number required.
typeString value indicating which type of element to use.
Valid value of this property attachment
useOriginalFilenameDetermines whether the uploaded attachment’s file name is preserved. If false, the name is updated based on filenameExpression. Default is true.
visibilityExpressionA reference to an Arcade expression that returns a boolean value. When this expression evaluates to true, the element is displayed. When the expression evaluates to false the element is not displayed. If no expression is provided, the default behavior is that the element is displayed.

Example

{
"attachmentKeyword": "front-of-house",
"description": "Take one photo of the front of the house.",
"inputType": {
"type": "image",
"inputMethod": "any",
"maxImageSize": 1280
},
"label": "Front of house",
"type": "attachment",
"editableExpression": "expr1",
"filenameExpression": "StandardizeFilename(`${$formElement.attachmentKeyword}_${Text(Now(), \"YMMDDHHmmss\")}`)",
"maxAttachmentCount": 1,
"minAttachmentCount": 1,
"allowUserRename": true,
"useOriginalFilename": false,
"visibilityExpression": "expr0"
}