Expand my Community achievements bar.

Script to check the null value of two fields

Avatar

Level 2

Hi there.  I got the following script to check the null value of the two field before a button can be enabled.  However, it seems that there is some syntax errors.  Can anyone please advise?

Thanks.

if (("TextField1[0]").rawValue <> "" & ("DateTimeField1[0]").rawValue <> "") {
oTargetField = this.resolveNode(" form1.#subform[0].Button1");
   oTargetField.access = "open";}

2 Replies

Avatar

Level 9

Hi,

Instead of putting "" try with null.

For Ex : TextField1.rawValue <> null.

One more thing : Why have you used quotes("") before field names? Remove the quotes if you are not using resolveNode method.

Thanks.

Bibhu.