AddSDIAttachment
Description:
Uploads or references a file as an attachment to to an SDI in the application.
Input Properties
sdcid
Description:
Identifier of the SDC for the SDI to which you are adding the Attachment.
Required:
Yes
keyid1
Description:
Identifier of the SDI in the specified SDC.
Required:
Yes
keyid2
Description:
Second part of the identifier of the SDI when the primary key is formed from multiple columns.
Required:
Only for multi-key SDCs.
keyid3
Description:
Third part of the identifier of the SDI when the primary key is formed from multiple columns.
Required:
Only for multi-key SDCs.
attachmentclass
Description:
The attachment class to apply to the new Attachment.
Required:
No.
filename
Description:
Name of (and path to) the file to be linked. Use this property or sourcefilename but do not use both.
When provided, this file will not be uploaded. A reference pointer to the file will be stored as an attachment to the SDI.
Example: \\fileshare\attachment.pdf.
In this example, 'attachment.pdf' must always be accessable by all servers in a cluster in the same way.
In some cases, unsafe characters such as backslash may need to be ascii-encoded when this action is called.
Required:
Yes - when a sourcefilename is not provided.
Comments:
This path must be allowed through configuration of a node in the FileLocationPolicy. See also the property 'filelocationpolicynode'
sourcefilename
Description:
Name of (and path to) the file that will be uploaded to LabVantage as an attachment.
Required:
Yes - when a filename is not provided.
Comments:
Use this property or filename but do not use both. This file will be uploaded to LabVantage and stored into a repository.
This path must be allowed through configuration of a node in the FileLocationPolicy. See also the property 'filelocationpolicynode'
type
Description:
Determines how the file containing the Attachment is saved. Possible values:
R = (meaning "Reference") saves only the File Name to the database. This is a reference to the attachement.
S = (meaning "Store") uploads a copy of the file and stores the copy to the appropriate attachment repository.
Required:
Yes
Comments:
Use 'R' when supplying a 'filename'. Use 'S' when supplying a 'sourcefilename' See also the property 'filelocationpolicynode'
description
Description:
Textual description that will be shown to users as an explaination for or the purpose of this attachment.
Required:
Yes
applylock
Description:
Accepts Y or N.
This determines if the SID will be locked during Action processing. If an attempt is made to lock the SDI but a lock cannot be obtained, the action will fail.
Required:
No
index
Description:
Determines whether or not (Y/N) the attachment should be indexed.
Required:
No
uploadto
Description:
Assumes that a sourcefilename is provided. The file will be stored to this location.
Required:
No
Comments:
In a clustered enviornment, make sure all nodes of the cluster can access this same location in the same way.
If no uploadto is provided, an attachment repository is used.
oleclass
Description:
OLE class name. This applies only to OLE links made in LVX Maintenance and Maintenance Grid Pages.
Required:
No
eventnotify
Description:
Determines whether or not (Y/N) an event is posted on the ToDo List when the Action executes.
Deprecated:
As of LabVantage version 7, Event Notify actions are no longer generated.
documentfield
Description:
Reference to a document file field. This property is typically only used in the Graphical Action Processor for file field processing.
Required:
No
attachmentrespositoryid
Description:
The repository id for the storage of the attachment. If left blank then it will use the attachment policy rules to set the repository.
Required:
No
attachmentrespositorynodeid
Description:
The node of the attachment repository. Only required when providing an attachment repository. If left blank, then will default to Sapphire Custom.
Required:
No
filelocationpolicynode
Description:
The node of the FileLocationPolicy used to determine if the source file is in an allowed location and if the file type is allowed.
Required:
No
Additional Information
Additional information concerning this Action:
This Action inserts a new record in the SDIAttachment table.
Copyright © 1999-2025 LabVantage Solutions, Inc.