Avatar

Level 3

My form has a repeatable subform that contains both a scripted button for adding attachments and a list box (titled "attachedfile") which displays the attached files.  As the subform is repeated there are more buttons and from which I can add more attachments to their respective list boxes.  The script appears to work like a charm, but if I manually try to view the attachments I'm only able to see the last one.  When I save the PDF, the file names in the list boxes disappear and I'm only able to open the last file I attached.  Here's the script for my attach button, hopefully someone can point out my problem.

var

myDoc = event.target;

var

sFile = "myFile"

myDoc.importDataObject({cName

: sFile});

var

myDataObject = myDoc.getDataObject(sFile);

var

sFileName = myDataObject.path;

sub9.Table20.Row1.attachedfile.addItem(sFileName

, sFile);

-gollum