LaneP
LaneP
10-07-2019
I am having an issue with file attachment script. If several files are attached (3+) and removed, they can no longer be opened. Also, the actual attachments are not being capture in the list on the form properly.
Thanks for your assistance.
LaneP
LaneP
10-07-2019
form1.page1.Block13.FileAttachments.attachmentsList::ready:layout - (JavaScript, client)
if( attachmentsList.length != 0){
this.caption.value.resolveNode("#text").value = " List of Attachments ["+attachmentsList.length+"] (All Files Must be Attached Prior to Signing, i.e., for any digital signature on the form)";
}
else{
this.caption.value.resolveNode("#text").value = " List of Attachments (All Files Must be Attached Prior to Signing, i.e., for any digital signature on the form)";
}
form1.page1.Block13.FileAttachments.AddAttachment::click - (JavaScript, client)
var oObj = event.target;
var fileAttachments = oObj.dataObjects;
if( fileAttachments == null){
if (oObj.importDataObject(0) != false){
var oDataObj = oObj.getDataObject(0);
attachmentsList.addItem(oDataObj.path);
}
}
else if( fileAttachments != null){
if (oObj.importDataObject(fileAttachments.length) != false){
var oDataObj = oObj.getDataObject(fileAttachments.length);
attachmentsList.addItem(oDataObj.path);
}
}
else{ app.alert("Error processing this request.");}
form1.page1.Block13.FileAttachments.ViewAttachment::click - (JavaScript, client)
var oObj = event.target;
var sAttachObjName = attachmentsList.selectedIndex;
if (sAttachObjName != -1){
oObj.exportDataObject({ cName: sAttachObjName, nLaunch: 2 });
}
form1.page1.Block13.FileAttachments.RemoveAttachment::click - (JavaScript, client)
var oObj = event.target;
oObj.removeDataObject(attachmentsList.selectedIndex);
attachmentsList.deleteItem(attachmentsList.selectedIndex);
Mayank_Gandhi
Employee
Mayank_Gandhi
Employee
10-07-2019
Hi There,
Please share the sample form and also the version of Acrobat and designer that you are using?
LaneP
LaneP
10-07-2019
I am using Designer 6.2. I don't have the option to upload a PDF, only images or hyperlink.
Mayank_Gandhi
Employee
Mayank_Gandhi
Employee
10-07-2019
Hi Lane,
You can share it via shared drive.
LaneP
LaneP
10-07-2019
Here is a link: https://www.esd.whs.mil/Portals/54/Documents/DD/forms/dd/File%20Attachment%20Issue.pdf
Thanks for your assistance.
LaneP
LaneP
19-07-2019
Mayank,
Did you have luck with the issue? I have determined the feature will only work for a couple attachments that are added or removed a minimal number of times.
Mayank_Gandhi
Employee
Mayank_Gandhi
Employee
19-07-2019
I am unable to catch hold of the issue but the problem is even if you have two files also. The files are unable to open once you have clicked on remove attachment after selecting a file. It's like the list still has the name but the value of attachment in null.