Hi,
basically what I'm trying to do is to assign data (not stored in any container on a form) directly from the dataview to a javascript array, e.g.:
var myArray = []
and here's the dataview that I have:
- Z_SFP_MYFORM
- INFO
- GT_INFO
- DATA
- NAME
- ADDRESS
- COUNTRY
Let's say I'd like to have all the instances of the NAME field assigned directly to myArray - what should I do? I repeat: this data isn't stored in any container (textfield or any other kind of field) on the form.
I've already looked through the SOM reference but it didn't help as much as I had expected, so I'm still struggling with getting the things done.
Any help will be greatly appreciated
Regards
T.
Each of the different data sources has it's own structure in the XFA. But there is not real data here. These are services for connecting to the external source and acquiring data, the "sourceSet" model has functions for acquiring data from a DB, and the "connectionSet" model has function for acquiring data from a web service. For a JavaScript example of how to get into this structure look at the code in the initialize event for the "Data DropDown" field. It's in the Custom Library tab.
But the data view info can also serve to organize data in the "datasets" model, which is where, for example, you'd find mutiple instances of the "name" data associated with mutiple "name" fields on the form.
You can access any of the XML nodes associated with these XFA structures though JavaScript. But the SOM reference is the wrong place to look. You need the XFA Object Reference and the Architecture document, You can find both here:
http://partners.adobe.com/public/developer/xml/topic.php
But you'll also get the most relevant, and immediate info by examining the form's XML.
Thom Parker
The source for PDF Scripting Info
www.pdfscripting.com
Very Important - How to Debug Your Script