Hello,
I am trying to put some validation/code, by using the 'IF' condition as below with 'OR' operator, but, its not working(am not getting any syntax erorr), pls. let reframe correctly, pls. note that 2 periods after my_form, am using it to point the text object/drop-down, bcz until run time i dont know the object's name
if ((xfa.resolveNode("my_form.." + myArrayReq[i]).rawValue == null) || (xfa.resolveNode("my_form.." + myArrayReq[i]).rawValue == "")){
// my code come here, like populate some variable
};
Thank you
Solved! Go to Solution.
Views
Replies
Total Likes
Glad its working. In relation to the array, I just could not see the rest of the script, in order to see the lead in to the if statement.
Niall
Views
Replies
Total Likes
Hi Srinivas,
Try moving the xfa.resolveNode out of the if statement and use a variable.
In addition if you use the tripple equal sign for testing that two operands are identical, you can then omit == null AND == "".
var myVariable = xfa.resolveNode("my_form.." + myArrayReq[i]).rawValue;
if (myVariable === null) {
// your code
}
Also the way you are passing the array through the xfa.resolveNode may be incorrect. Test using console.println or an app.alert.
Good luck,
Niall
Thank you.
Also the way you are passing the array through the xfa.resolveNode may be incorrect. Test using console.println or an app.alert.
For me, its working, yes i tested it, its fine.
Any comments?
Thank you
Views
Replies
Total Likes
Glad its working. In relation to the array, I just could not see the rest of the script, in order to see the lead in to the if statement.
Niall
Views
Replies
Total Likes
Views
Likes
Replies
Views
Likes
Replies
Views
Likes
Replies