on ‎2006 Oct 11 8:55 AM
Hi,
does anybody know, how to access a context element with javascript in an adobe form, because I have to decide which elements will be shown at the form, depending on one context value.
Thank you for your help!
Kind regards, Patrick.
Request clarification before answering.
Hi,
First of all your WD context is mapped to the data view in the form. You can only access via scripting what is mapped to the data view and you get the values that the PDF currently has stored. The WD context and the data values in the context might differ (eg. due to editing).
Use scripting like xfa.resolveNode("xfa.dataset.data.<path.to.the.node>") to get a reference to the data node.
Then you can use the "value" property to access the data value.
Regards
Juergen Hauser
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi
Using the xfa.resulveNode or anything else, is it possible to know the number of rows directly from the context table?
Scenario:
Context table: tb_items
The context table is not bind to any layout but we need to know the number of rows.
If the tb_items would be assigned to the layout, we would be able to use the following code
var nbrRows = $.instanceManager.count
But if it is not bind how can we get the number of rows?
The following code doesn't work it end in code error.
var cnt xfa.resolveNode("xfa.dataset.data.Main.tb_items").count ;
var cnt xfa.resolveNode("xfa.dataset.data.Main.tb_items").length ;
RegardsDaniel| User | Count |
|---|---|
| 7 | |
| 4 | |
| 4 | |
| 4 | |
| 3 | |
| 2 | |
| 2 | |
| 2 | |
| 2 | |
| 2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.