Expand my Community achievements bar.

Dive into Adobe Summit 2024! Explore curated list of AEM sessions & labs, register, connect with experts, ask questions, engage, and share insights. Don't miss the excitement.

Loop thru table to make only rows that are not null visible

Avatar

Level 9

I created a table that has a question in one row and a hidden row directly below each question that can be opened (made visible) to add text in the ActionItem field.

I am trying to write a script that counts how many Action rows that have data entered into the ActionItem field (!==null) and make only those rows visible. 

Here's my attempt that does not work:

for (var a=0;a<Form1._Table2.count;a++){

for (var b=0;b<Form1.Table2.all.item(a)._Action.count;b++){

  if (Form1.Table2.all.item(a).Table2.Action.all.item(b).Table3.Row1.ActionItem.rawValue !== null){

   Table2.all.item(a).Table2.Action.all.item(b).Table2_Action.presence="visible";

  }

  }

  }

ScreenPrint.PNG

0 Replies