Avatar

Level 1

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

1808071_pastedImage_0.png