Hi,
I'm having difficulty with a scripting problem. I would like to hide any table row 'DATA_COND' where VTEXT within that row is equal to "Price".
This is the code I have created that does not work:
for (var a=0;a<data.BODY.ITEM_DETAIL.DATA_DETAIL.count;a++){
for (var b=0;b<data.BODY.ITEM_DETAIL.DATA_DETAIL[" + a + "].DETAILS.ITEM_CONDITIONS.CONDITIONS.DATA_COND.count;b++){
if (xfa.resolvenode("data.BODY.ITEM_DETAIL[" + a + "].DATA_DETAIL.DETAILS.ITEM_CONDITIONS.CONDITIONS.DATA_COND[" + b + "].VTEXT").rawValue== "Price"){
xfa.resolvenode(data.BODY.ITEM_DETAIL[" + a + "].DATA_DETAIL.DETAILS.ITEM_CONDITIONS.CONDITIONS.DATA_COND[" + b + "]).presence="hidden";
}
}
}
Where DATA_DETAIL repeats for each item and DATA_COND repeats for each item
Any pointers to where I might be going wrong?
Many Thanks!
Matt
Solved! Go to Solution.
Hi there,
there's some minor details you need to fix in your code, see the following:
Bold text is where I amended the code
instanceManager needs to be accessed to manage instances of the object itself.
It also can be accessed by using an underscore before the name of the object in question like the following:
I hope this will help
Let me know if you need clarifications..
Hi there,
there's some minor details you need to fix in your code, see the following:
Bold text is where I amended the code
instanceManager needs to be accessed to manage instances of the object itself.
It also can be accessed by using an underscore before the name of the object in question like the following:
I hope this will help
Let me know if you need clarifications..
Views
Replies
Total Likes
Can you send the form please?
Views
Replies
Total Likes
You can propably do the same with just one line of code in the calculate event of "DATA_COND":
this.presence = VTEXT.rawValue === "Price" ? "hidden" : "visible";
Views
Replies
Total Likes