attachment Element

 

Content

attachment Element

Description

Properties

Description

The attachment Element configures attachment details in SDI Maintenance Pages. See Attachments for details and examples.

Properties for the attachment Element

Property Name Description
SDC SDC for the SDIs associated with the item. You must specify this if the columns you add (using the Columns property below) are in this SDC.
Default File View Specifies the view to load when the Element opens (see Attachments → Attachment Interface → Views). This applies to the initial opening of the page. Subsequent visits to the page will remember the User's last view.
View Only Determines if the Element is editable. This is automatically set to "Yes" if the primary is locked.
Tab Configures the tab containing the information:
Property NameDescription
Show Yes displays the information beneath the tab. No displays the information without the tab.
Text Text displayed on the tab.
WidthWidth of the tab in pixels.
body WidthWidth of the area beneath the tab where information is displayed (in pixels).
body HeightHeight of the area beneath the tab where information is displayed (in pixels).
Expandable Yes installs a +/- control on the tab. Clicking + expands the tab to show its contents. Clicking - collapses the tab.
Expanded Yes opens the page with the tab expanded. No opens the page with the tab collapsed. You must have the Expandable property (above) set to Yes.
Highlight Yes highlights the tab on mouseover.
TipPopup text displayed on mouseover.
IdIdentifier of the element tag on the JSP. This is the "id" attribute of the tab tag <sapphire:tab>. For guidelines concerning use, see tab tag in the LabVantage Custom Tag Reference.
Collapsed TextText to display when tab is collapsed (such as "Click here to expand").
GroupTab group to which this Element belongs.
Columns Specifies the columns displayed under the tab and their attributes. Note that columns such as TypeFlag and AttachmentClass are controlled by the Element and will be overridden by any columns added in this collection. The width property is deprecated as width is governed by the element.
Property NameDescription
IdentifierUnique identifier for this item, rendered as an ID attribute in the HTML tag.
ColumnIdentifier of the column to be displayed.
TitleText displayed to identify the Column Id.
ModeDisplay format of the column (defaults to readonly).
Width Width of the column in pixels.
Translate ValueDefault value to use when creating new SDIs. If creating from an SDI Template, the Default Value overrides the value in the Template. This accepts variables such as the current user (such as [currentuser]) and relative date format (such as [today]).
Dropdown RefTypeIf the Column Mode property is dropdownlist, this is the identifier of the Reference Type defining the selectable values.
Dropdown SQL SQL script that retrieves data when the Column Mode property (above) is set to "dropdownlist". If two columns are selected, the first column is used as the actual data, and the second column is used as the Display Value.

For example, if you setup a sampledesc column in dropdownlist mode, then specify the DropdownSQL script

select s_productid, productdesc from s_product

the Element should render a dropdown list of productdesc for the sampledesc field. If the query is

select s_productid from s_product

the Element should render a list of Product SDIs.

Attachment Types Specifies the Attachment Types managed by this Element (see Attachments → Attachment Types).

As an example, this allows you to have one Element managing "Rich Text" Types and another to manage "File" Types (or one Element managing only "Rich Text" and "File"). Any choices made here will be a subset of the Attachment Policy setting. For example, If the Attachment Policy does not show "File" Types and this Element shows "File" Types, it will be forced to not show "File" Types. This property also governs which options appear in the button used to add Attachments. For example, if you have only "Rich Text", only the "Add Rich Text" button option will be available.

PropertyDescription
Attachment Type Attachment Type to be managed by this Element.
Content EditableDetermines if the content of the Attachment Type is editable.
Allow File Upload If the Element allows "File" Attachment Types, setting this to "Yes" shows the "Upload File" button to allow browsing for files.
Paste From Clipboard If the Element allows "File" Attachment Types, setting this to "Yes" allows clipboard contents to be pasted into the attachment Element.
Take and Browse Photos If the Element allows "File" Attachment Types and the image format (JPG or PNG) is allowed by the File Location Policy, setting this to "Yes" allows uploading photos and browsing for images (see Attachments → Attachment Interface → Photos).
Allow Live Photo Upload If the Element allows "File" Attachment Types, the image format (JPG or PNG) is allowed by the File Location Policy, the native camera is available, and the device is not blocked (such as Chrome blocking an invalid HTTPS connection), setting this to "Yes" allows a photographic image to be rendered from a live streaming camera. See Attachments → Attachment Interface → Photos).
Add Drawing If the image format (PNG) is allowed by the File Location Policy, setting this to "Yes" allows drawings to be added as Attachments (see Attachments → Attachment Interface → Image Editing and Drawing Tools).
Allow Image Editing Setting this to "Yes" exposes image editing tools (see Attachments → Attachment Interface → Image Editing and Drawing Tools).
Show Button Dropdown Setting this to "No" hides the dropdown provided by the "Upload File" button and replaces the dropdown with a rendering of all available buttons that are allowed by the configuration of this Element.
Show Remove Button Setting this to "No" hides the "Remove" button.
Allow Attributes Default Yes. Set to No to hide option to add and edit attributes on attachments.
Filter Attachment Classes Lets you filter the Attachment Classes shown in the Element. If selected here, only Attachments of the specified class will be listed in the "Class" field. If there are no filter classes provided, then it will simply default the drop down and show all classes (no filtering).
Default Attachment Class Provides a default class if none is provided. If the filterclass collection has just one entry, then this property is not required as the filterclass will default to that provided class. However, if there is more than one filter class, then this property can be used to specify the default. If the class does not exist in the filter classes, then it will be pushed in.
Attachment Excludes Specify a list of file types (by file extension) to exclude.
PropertyDescription
File Types to ExcludeProvide a comma separated list of the file extensions you want to exclude.
File Types to IncludeProvide a comma separated list of the file extensions you want to include.
NOTE:If the same extension is on both the Exclude and Include list the Exclude list will be used.
File Repository Id The Attachment Repository in which to store Attachments. When provided, this will override any Attachment Policy storage rules. Consider specifying a repository here if you are browsing unmanaged repositories.
File Repository Node The repository Node to use (such as "Sapphire Custom").
Maximum Number Of Attachments Set to the maximum number of attachments you can store against an SDI for this element.