List Manipulation

List Manipulation

Here's a puzzler: Let's say a list has a maximum number of 10 elements. If a form is loaded, and a user defines two elements (at index 0 and 1) out of the maximum 10, how can we script to add arbitrary values for the remaining 8 elements?

What I was looking for was something like

  1. mylistsize=input.MY_LIST.size() ;
  2. for index = (9 - mylistsize) to 9
  3. {
  4.     MY_LIST.add("XXX");
  5. }
To add 8 more arbitrary elements to the list to bring it to 10 elements. Am I totally missing something obvious?

John M. Whitney