Skip to Content
author's profile photo Former Member
Former Member

Unable to create Attachments at node level (for AdvancedListPane)

Hello all,

We have a requirement to create an AdvancedListPane, one of the columns of which will have a button to upload Attachments. It should look like this:-

BO:-

To store the attachment, we have added a dependent object within our node. Our Business Object looks somewhat like this:-

import AP.Common.GDT as apCommonGDT;

businessobject TestBO {

[AlternativeKey]element testUUID:UUID;

node TestList [0,n] {

element TestDate:Date;

element TestText:LANGUAGEINDEPENDENT_Text;

element TestText2:LANGUAGEINDEPENDENT_Text;

[DependentObject(AttachmentFolder)] node TestAttachements;

}

}

UI:-

On the UI front, we have created a new Embedded Component, containing an AdvanceListPane. For the attachments column, we have changed the "DisplayType" of the column to "button". The click of this button will open a modal dailog on which we have placed the Attachments reuse component "COD_DocumentList". We bound the Attachments Reuse Component using the node hosting the DependentObject, "TestList" in this case.

Upon deploying, we were able to open the modal dialog on the click of the button. The modal dialog contained the attachment reuse component as shown below.

Upon clicking Add > Local File on the above form, we are able to see the file selection popup. It allows to browse and select the file to be uploaded. But the file doesn't get added.

Please note that this works fine and we are able to attach the file successfully when the dependent object is placed directly under root instead of the node in the BO, and the Attachments Reuse Component is bound to "Root" of the data model instead of the node.

businessobject TestBO {

[AlternativeKey]element testUUID:UUID;

node TestList [0,n] {

element TestDate:Date;

element TestText:LANGUAGEINDEPENDENT_Text;

element TestText2:LANGUAGEINDEPENDENT_Text;

}

[DependentObject(AttachmentFolder)] node TestAttachements;

}

This approach however is not suitable for our requirement because we are interested in storing Attachments per row of the list, and not one common copy for the entire BO.

Can anyone suggest a way to bind the Attachments Reuse Component at node level. Any workarounds are also welcome.

Thanks in advance,

Sanat

Add a comment
10|10000 characters needed characters exceeded

Related questions

1 Answer

  • Best Answer
    Posted on Jan 02, 2014 at 07:14 AM

    Hi Sanat,

    I would suggest you put the attachment EC into your List PreviewPane, then you will get the attachment by every row of your list.

    Bind your Attachment EC to your TestList.

    It works in my trying.

    Thanks.

    Chris


    Attachment.jpg (93.6 kB)
    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member Chris Bai

      Hi Chris,

      Thanks again. This worked! As per your suggestion, I added the modal dialog onto our ListPreviewForm and bound it to the node. This worked perfectly as per our requirement. I am now able to upload attachments per node.

      Thanks a lot.

      Regards,

      Sanat

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.