I'm having troble following the advise given in this thread: http://www.acrobatusers.com/forums/aucbb/viewtopic.php?id=16903
Basically, I want to do the same thing radzmar wanted to do. I'm almost there but my inexperience with the products are holding me back.
I have created a folder level config.js file that looks like this:
//DateTime function
function myDateString() {
return util.printd("yyyymmdd_HHMMss", new Date());
}
// SaveAs Function test
var mySaveDoc = app.trustedFunction(function(doc) {
app.beginPriv();
var myPath = "/drive/morepath/" + myDateString() + ".pdf";
// saveAs is the only privileged code that needs to be enclosed
// with beginPriv/endPriv
doc.saveAs(myPath);
app.endPriv();
});
I have a button on my form with the following in the on click event:
mySaveDoc(event.target);
Now I want to add the contents of the field titled "Employee_Name" to the end of the file name (after the date/time string).
I believe the whole field name is topmostSubform.Page1.Article.Employee_Name
I don't know how to change my config.js and where or how to pass the contents in the employee name field along.
Any help would be appreciated
Jcarmody
First off, the save as and my config.js works great! That is the good news. I just need to pass a value from the form to be part of my file name. I've now added the following to a mouse down event in my form:
name = resolveNode("topmostSubform.Page1.Article.Employee_Name").rawValue;
event.target.mySaveDoc(event.target);
In the java debug window I get the message:
name is not defined
13:Folder-Level:User:config.js
Do I need to add a reference to name in my config.js? What would be the format.