I'm getting a strange error with a simple action:



Exception in line 7 of function top_level, script XFA:form1[0]:Page1[0]:DateTimeField1[0]:initialize.

The action is to set the date to todays date when it's initialized, i've done this countless times before but it doesn't seem to work today. Does anyone know why I'm getting this error?

This is the auto generated code:

//+ GENERATED - DO NOT EDIT (ID:443BB922-B5CF-4C2E-AC98-90E109B03150 CRC:1922439632)

//+ Type: Action

//+ Result1: SetFieldValue("$Node1","totoday","")

//+ Node1: form1[0].Page1[0].DateTimeField1[0]

//+ Condition1: DateField("$Node1","initialized","")

//+ ActionName: DateTimeField1.initialize

this.resolveNode("$").rawValue = util.printd("yyyy-mm-dd", new Date());


I also get this error when the event is set to exited:

Invalid property get operation; subform doesn't have property 'prototype'

Accepted Solutions (0)

Answers (2)

Answers (2)



Hmm I tried your script but it still doesn't seem to work. Other PDF's I've created since work ok with dates so I'll create the form again.





The script is fine, maybe the JavaScript engine of your PDF viewer has crashed. Try to reboot your computer.

You also can type the script yourself, instead using the action generator. The result is a more compect code:

this.rawValue = this.isNull ? util.printd("yyyy-mm-dd", new Date()) : this.rawValue;