Avatar

Level 4
Level 4

Nice find Bruce! Works like a charm!

I thought I know the XFA specs pretty well, but how on earth did you find out about using dataNode as a property of this? According to my understanding, it shouldn't even exist (and doesn't from what I've seen in the XFA specs).

It seems that regardless of what event I'm hooking into, the render engine calls the script an extra time on an empty record, resulting in an error (that a2 is null). It's easy enough to filter the occurence out by doing:

var n = this.resolveNode("dataNode.parent.a2");
if (n !== null && n.value === "credit")  { ... }

Although I'm still curious as to why...