Quantcast
Channel: Adobe Community: Message List
Viewing all articles
Browse latest Browse all 97529

Re: Hide repeating table row based on value?

$
0
0

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

 

for (var a=0;a<data.BODY.ITEM_DETAIL.DATA_DETAIL.instanceManager.count;a++){

     //I suggest you take a hold of the instance within a variable to have shorter conditions for the next statements

     var oneDetail = data.BODY.ITEM_DETAIL.resolveNode("DATA_DETAIL[" + a + "]");

     for (var b=0;b<oneDetail.DETAILS.ITEM_CONDITIONS.CONDITIONS.DATA_COND.instanceManager.count;b++){

          //Same here, I suggest take a hold of each item within a variable

          var oneCondition = oneDetail.resolveNode("DATA_DETAIL.DETAILS.ITEM_CONDITIONS.CONDITIONS.DATA_COND[" + b + "]");

          if (oneCondition.VTEXT.rawValue== "Price"){

               oneCondition.presence="hidden"; 

          }

      }

}

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:

 

data.BODY.ITEM_DETAIL._DATA_DETAIL.count

I hope this will help

Let me know if you need clarifications..


Viewing all articles
Browse latest Browse all 97529

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>