Attachments Property

General info

Label

Attachments

Description

File attachments stored in MongoDB file store.

Data type

FileList

Default value

{\"meta\":{\"id\":\"urn:id:64:37\"}}

Type

TableSchemaBound

Code

12570

Symbolic name

MODEL_PROP_ATTACHMENTS

Lua access code

syslib.model.properties.Attachments

Available since

1.76.3

Parent classes

ActionItem | AdvancedTrend | AdvancedTrendPen | AdvancedTrendXAxis | AdvancedTrendYAxis | AlarmGenerator | AliasItem | AnalogMeasurement | Area | Asset | BPRPublisher | BatchEquipmentPhaseDefinition | BatchEquipmentStepDefinition | BatchOperationDefinition | BatchTracker | BatchTrackerBackfill | BinaryState | Broker | Cache | CalculatedValue | Chart | CloudSinkItem | Connector | ControlModule | Core | CustomBigTableDataStore | CustomEventDataStore | CustomProductionTrackingDataStore | CustomTimeSeriesDataStore | CustomTimeSeriesDataStore2 | DBDispatcherItem | DBObjectController | DBSinkItem | DCS | DataDocument | DataFolder | DataStoreGroup | Datasource | DiscreteState | DisplayFileBrowser | DisplayJsonViewer | DisplayScriptManager | DisplayStateChanges | DisplayWebChart | DisplayWebTrend | Division | Enterprise | EquipmentModule | EventArea | EventAttribute | EventCategory | EventCondition | EventNode | EventSource | EventStream | EventSubCondition | EventType | Eventtracker | FeedbackItem | FileMonitor | GenFolder | GenItem | GenKPI | GenericEventBuffer | GenericTimeSeriesBuffer | HealthMonitor | HistoryController | HistoryExporter | HistorySinkItem | HistorySupervisor | HistoryTransporter | HolderItem | ITLogAnalyzer | ITLogConfigurator | ITLogGroup | InternalEventStream | IoItem | IoItemGroup | IoNode | IoProperty | ItemConfigJsonViewer | ItemConfigScriptManager | ItemConfigStateChanges | ItemConfigTablePropertyGrid | KPIBookmark | KPIDashboard | KPIEmbeddedContent | KPIGroup | KPIInstance | KPIProfile | KPIProfileGroup | KPIServer | KPITable | KPIWidget | LinkItem | MaterialClass | MaterialClassProperty | MaterialDefinition | MaterialDefinitionProperty | MaterialLot | MaterialLotProperty | MaterialSublot | MaterialTestResult | MaterialTestSpecification | MessageBroker | MessageConfiguration | MessageProcessor | OpcUaTcpServer | OpcUaTcpServerEndpoint | Parameter | PerformanceFolder | PerformanceIndex | Plant | PlantCompound | ProcessCell | Profile | RedItem | RedStream | Relay | RemoteServiceGroup | ReportGenerator | ReportItem | Root | Rule | RuleNode | S95EMArea | S95EMControlModule | S95EMEnterprise | S95EMEquipmentModule | S95EMEquipmentProperty | S95EMPCUnit | S95EMPUUnit | S95EMProcessCell | S95EMProductionLine | S95EMProductionUnit | S95EMSite | S95EMStorageUnit | S95EMStorageZone | S95EMWorkCell | S95EMWorkCenter | S95EMWorkUnit | SchedulerItem | ScriptEvents | SecurityPerimeter | Server | ServerEventTypeProperty | ServerEventTypes | ServerForwardedEventType | ServerTypes | Site | StandardReport | StoredCredentialsGroup | System | TPMOEEAvailabilityIndex | TPMOEEIndex | TPMOEEPerformanceIndex | TPMOEEQualityIndex | TPMOEETimeValue | TPMTEEPIndex | TableHolder | TablePropertyGrid | TemplateNode | TextualState | UaEventTypeAttribute | UaEventTypeNode | UaServerNode | UaTypeNode | Unit | User | UserGroup | Variable | VariableGroup | WebAPISecurityAdfs | WebAPIServer

Attributes

Name Tooltip
PROP_CONFIGURABLE The property is configurable and can be changed with DataStudio and the various inmation APIs.
PROP_VISIBLE The property is visible in DataStudio and can be read by the inmation APIs.

Schema Definition

Name: FileMetadata

Description: Schema for metadata of files

Columns
Column Data Type Nullable Unique Default Min Max Description
_dbref String true false 1 Internal database document reference
datemodified Integer true false Date modified
dateuploaded Integer false false Upload date
extension String true false 1 Extension
name String false true 1 Name
path String true false 1 Path
size Integer false false Size

Examples

Read from or write to the Attachments property.

  • Lua

  • C#

-- Read from the Attachments
syslib.getvalue("<OBJECT FULL PATH>.Attachments")

-- Write to the Attachments
syslib.setvalue("<OBJECT FULL PATH>.Attachments", '{"meta":{"id":"urn:id:22:2"},"data":{"Input":[1.0,2.0],"Value":["v1","v2"]}}')
TcpConfig tcpcfg = new TcpConfig() { HostNameOrIp = "localhost", Port = 6512 };
SecurityCredentials sc = new SecurityCredentials() { ProfileName = "<username>", Password = "<password>" };
StatelessInterface sli = new StatelessInterface(tcpcfg);

// Read from the Attachments
Result result = sli.ReadValue(sc, new ReadItem("<OBJECT FULL PATH>.Attachments"));
// Write to the Attachments
Result result = sli.WriteValue(sc, new WriteItem('{"meta":{"id":"urn:id:22:2"},"data":{"Input":[1.0,2.0],"Value":["v1","v2"]}}', "<OBJECT FULL PATH>.Attachments"));