Hey, I’m having a odd issue. In the Postopen of a form I am binding an event for the Querysave. The code looks something like this:
Select Case Source.Document.getItemValue(“Form”)(0)
Case "Workflow":
On Event Querysave From Source Call createDefaultState
Case "State":
On Event Querysave From Source Call createDefaultApprover
End Select
Set Me.attachToForm = Me
As you can see, this is the code from a utility function called in every form. It is supposed to look at the type of form and decide which function to bind to the Querysave.
The problem is that when the document is new (created for the first time) it has no value in the field “Form”. Therefore, document.getItemValue(“Form”)(0) returns nothing.
Weird. And it only happens on the form “State”. The other form with binding works fine. The binding works just fine when opening an existing document.
Any ideas on why the document has no “Form” field when first created?
Thanks, Nick
P.S. what is the correct choice to put in “Technical Field” on a post like this?