Avatar

Level 10

Hi,

A couple of things:

Concat is a FormCalc function. In JavaScript you would add (+) the two objects' rawValues. You may need to convert them to strings first - .toString().

Secondly you don't seem to be doing anything after you concatenate the two objects (???).

Lastly you seem to have a few unnamed subforms, which may cause the references to fail. See how to reference objects here: http://assure.ly/kUP02y (and the pitfalls in not naming objects and subforms).

A good debugging tip is to open the JavaScript Console (Control+J) and then insert a line in your script to write a variable out to the console. For example add this after you declare and set myVA:

console.println("This is myVA: " + myVA); 

If you get to declare the variable correctly, then the following JavaScript may work

myVA = myPrj.toString() + "-" + myYR.toString(); 

You may not need the .toString(), it depends on what the original objects are. Try without it first.

Hope that helps,

Niall