HowTo: transfer single attachments to the new 7.8 multi attachment attribute

Version 3

    Verified Product Versions

    LANDESK Service Desk 7.8.xLANDESK Service Desk 2017.x


    Service Desk 7.8


    Review Date:

    17/12/2014     initial release


    How to:

    With the release of 7.8 Service Desk allows to add multiple files to an attachment attribute. However, existing attachment attribute cannot be changed.


    Therefore a new Attribute of the Attachment type with subtype "Multiple Attachments" need to be created and added to the Attachment window. Existing attachments then needs to be copied to the new multi attachment attribute.


    Step by Step:

    We will assume that you want to add a multi attachment attribute for incident. On other processes the first letters oft the table might need to be adjusted. (IM = incident, CM = change, RM = request, HR = human resources)


    Changes to the Attachment Object

    • open the Object designer and open the Attachment Object


    • Add a new Attribute of type Attachment and Subtype "Multiple Attachments" to the Object. We will use "Multi Attachment Document" as the Title in this HowTo. Should you use a different Title than you may need to adjust the SQL script later in this HowTo to point to your new Attribute.


    • Save the new Object

    Changes to the Attachment window

    • Open the Window Designer and open the Attachment Window


    • add the new "Multi Attachment Document" to the window and remove the former single file attachment attribute


    • Save the new window


    Changes in SQL

    • open SQL and open a query in the context of LDSD database and run the following query to copy the attachments from your single file attachment attribute to the new multi file attribute
    update im_incident_attachment set usr_multiattachmentdocument = '<ArrayOfDataObjectAttachment>' + im_attachment + '</ArrayOfDataObjectAttachment>' 
    where im_attachment is not null -- only attachments with current attachments
      and (usr_multiattachmentdocument is null or usr_multiattachmentdocument = '<ArrayOfDataObjectAttachment />') -- copy only if multi file attachment attribute is empty