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

Re: How to populate table rows with selected listbox items?

$
0
0

So you're considering the fact the if the user clicks the button twice, the name will appear twice and you don't want this, right?

Then you must check if any value is the same than the one you are about to add in the row..

 

for (var i = 0 ; i < ListBox1.length; i++){

     if (ListBox1.getItemState(i) == true){

          for (var x = 0 ; x < Table1._Row1.count; x++){

               var boNewAttendee = true;

               var strAttendee = Table1.resolveNode("Row1[" + x.toString() + "]").txtAttendee;

               var newAttendee = ListBox1.getDisplayItem(i);

             

               if (strAttendee.rawValue == newAttendee){

                    boNewAttendee = false;

                    break;

               }

          }

          if (boNewAttendee){

               txtAttendee.rawValue = ListBox1.getDisplayItem(i);

          }

     }

}


Viewing all articles
Browse latest Browse all 97529

Trending Articles