Hi All,
I have a button which attaches a file
In the click event of the button:
app.execMenuItem("AddFileAttachment");
Which is working fine.
Now, I want to access the absolute file name of the attachment and display it in the text area in the PDF.
Can i access it in LiveCyle Designer through javascript coding?
Thanks
Abhiram
Views
Replies
Total Likes
Hi,
You could use code something like this from a button or some other event.
var d = event.target.dataObjects;
for (var i = 0; i < d.length; i++)
{
console.println("Data Object[" + i + "]=" + d[i].name);
}
Thank you so much Malcolm..
One more question reg. this
I want to automatically populate the text field with attachment names whenever a file is attached/an attachment is deleted.
Pls let me know in which event can i write this code.
Thanks
Abhiram
Views
Replies
Total Likes
Hi,
just adding it after your current button click event should work.
app.execMenuItem("AddFileAttachment");
var d = event.target.dataObjects;
for (var i = 0; i < d.length; i++)
{
TextField.rawValue = d[i].name;
}
Hope this helps
Malcolm
Views
Replies
Total Likes
Ya . But this wil not work in the cases when user add/remove attachments from the attachments panel.
So i was looking for an event which fires immediately when a user attaches/removes file from the attachment panel, so that the text field refreshes automatically.
hope i m clear.
Thanks
Abhiram
Views
Replies
Total Likes
Hi,
Did you manage to find a solution regarding this issue "So i was looking for an event which fires immediately when a user attaches/removes file from the attachment panel, so that the text field refreshes automatic"
If yes can you please share it
Views
Replies
Total Likes