GetAttachmentProperty method: IBInfo class
Syntax
GetAttachmentProperty(Content_ID, Property_Type)
Description
Use the GetAttachmentProperty method to return the value of an attachment property.
Parameters
| Parameter | Description |
|---|---|
|
Content_ID |
Specify the content ID of the attachment that you want to access, as a string. |
|
Property_Type |
Specify the type of property that you want to access. Valid values are: |
| Constant Value | Description |
|---|---|
|
%Attachment_Base |
Specifies the base name of the attachment, that is, if the actual document name you want is different, such as if it is zipped or otherwise compressed as part of other documents. |
|
%Attachment_Description |
Specifies the description of the attachment. |
|
%Attachment_Disposition |
Specifies the disposition of the attachment, whether it's displayed inline or as an attachment. |
|
%Attachment_Encoding |
Specify the encoding
of the attachment. For example, |
|
%Attachment_Language |
Specify the language used in the attachment, as a string. |
|
%Attachment_Location |
Specify an additional location for the attachment. |
|
%Attachment_Type |
Specify the attachment type. |
|
%Attachment_URL |
Specifies the URL for the attachment. The URL must be an absolute URL. |
Returns
A string containing the value of the specified property.
Example
The following example processes an attachment from a notification PeopleCode program:
Import PS_PT:Integration:INotificationHandler;
Class FLIGHTPROFILE implements PS_PT:Integration:INotificationHandler
method FLIGHTPROFILE();
method OnNotify(&MSG As Message);
end-class;
/* Constructor */
method FLIGHTPROFILE
%Super = create PS_PT:Integration:INotificationHandler();
end-method;
method OnNotify
/+ &MSG as Message +/
/+ Extends/implements PS_PT:Integration:INotificationHandler.OnNotify +/
Local rowset &RS;
Local integer &Count;
Local string &Attachment_Id;
Local array of array of string &Result;
&RS = &MSG.GetRowset();
&Count = &MSG.IBInfo.NumberOfAttachments;
If &Count > 0 Then
For &I = 1 to &Count
&Attachment_ID = &MSG.IBInfo.GetAttachmentContentID(&I);
&Result[&I][1] = &MSG.IBInfo.GetAttachmentProperty(&Attachment_Id,⇒
%Attachment_Encoding);
&Result[&I][2] = &MSG.IBInfo.GetAttachmentProperty(&Attachment_Id,⇒
%Attachment_Type);
&Result[&I][3] = &MSG.IBInfo.GetAttachmentProperty(&Attachment_Id,⇒
%Attachment_URL);
&Result[&I][4] = &MSG.IBInfo.GetAttachmentProperty(&Attachment_Id,⇒
%Attachment_Base);
&Result[&I][5] = &MSG.IBInfo.GetAttachmentProperty(&Attachment_Id,⇒
%Attachment_Location);
&Result[&I][6] = &MSG.IBInfo.GetAttachmentProperty(&Attachment_Id,⇒
%Attachment_Disposition);
&Result[&I][7] = &MSG.IBInfo.GetAttachmentProperty(&Attachment_Id,⇒
%Attachment_Description);
End-For;
End-if;
/* process data from message */
end-method;
Related Topics