Expand my Community achievements bar.

receiving a "missing ; before statement" error message

Avatar

Level 2

I cannot see what I'm missing on this one.  This is an Adobe form testing a checkbox (New) and if it has been checked it is required that at least one of the following checkboxes (A or B) is checked. If not, an error is to display on the form to the user.

This is code in Adobe LiveCycle Designer:

var BoxCount = xfa.resolveNode(''TopmostSubform.#subform[1].A'')A.rawValue  + xfa.resolveNode("TopmostSubform.#subform[1].B")B.rawValue

if (new.rawValue==1) {

  if (BoxCount == 0) {

    (app.alert ("You must select at least on Building for Access");

}

}

When running the debugger I get:

missing ; before statement

1: Console.Exec

undefined

Any help is appreciated!

3 Replies

Avatar

Former Community Member

Remove the ( before the app.alert.

In the BoxCount statement when you reference the objects it should be xfa.resolveNode(''TopmostSubform.#subform[1].A'').rawValue

The same for the B object

Paul

Avatar

Level 2

Thank you Paul -

I now have:

var BoxCount = xfa.resolveNode("TopmostSubform.#subform[1].A").rawValue + xfa.resolveNode("TopmostSubfomr.#subform[1].B").rawValue

and get the following error:

xfa.resolveNode("TopmostSubform.#subform[1].A") has no properties

1:Console.Exec

What am I missing?

Thanks for your guidance!!

Avatar

Former Community Member

Take the [1] away from the #subform.

If that does not work I suggest you post the form.

Paul