I have created a sample form with 3 attachment boxes in, they all add attachments fine, but when I open the first attachment in box 1 that opens fine, but when I try to open the attachment in Box 2 it will only open the attachment in Box 1
Code to Open Attachment is:-
try{
var myDoc = event.target;
var sFile = ListBox1.rawValue;
myDoc.exportDataObject({ cName: sFile, nLaunch: 2 });
catch(e)
Any help would be appreciated
Views
Replies
Total Likes
sp215,
Is this the complete code? It doesn't look syntactically correct (no closing bracket.) Have you used the syntax/error checker?
Views
Replies
Total Likes
The closing bracket was missing off the screen shot - but the code works perfectly for one attachment box
Views
Replies
Total Likes
Do you use the same script for all 3 Lists?
You may accidenty use var sFile = ListBox1.rawValue; for all of them! have you checked this?
Views
Replies
Total Likes
Hi,
This is the script for the adding and opening of the listboxes.
Add attachment – Listbox1
var myDoc = event.target;
var sFile = "myFile" + NumericField1.rawValue;
var myDataObject = myDoc.getDataObject(sFile);
var sFileName = myDataObject.path;
ListBox1.addItem(sFileName,sFile);
NumericField1.rawValue = NumericeField1.rawValue + 1;
Add attachment – Listbox2
var myDoc = event.target;
var sFile = "myFile" + NumericField2.rawValue;
var myDataObject = myDoc.getDataObject(sFile);
var sFileName = myDataObject.path;
ListBox2.addItem(sFileName,sFile);
NumericField2.rawValue = NumericeField2.rawValue + 1;
Open attachment – Listbox1
try{
var myDoc = event.target;
var sFile = ListBox1.rawValue;
myDoc1.exportDataObject({ cName: sFile, nLaunch: 2 });
}
catch(e)
{
}
Open attachment – Listbox2
try{
var myDoc = event.target;
var sFile = ListBox2.rawValue;
}
catch(e)
{
}
I need to find a way of clearing the list box before opening as it is retaining the 'last' opened document regardless of which listbox it was from
Thanks
Views
Replies
Total Likes