Try Set Variable [ $vList ; List ( $vList ; table::Field ) ]
Oh I just realized I forgot the concatenation in my $vList, it should have read; Set Variable ($vList ; $vList & ¶ & Table:Field ) but no matter now, if I can do it with a List function that would be really cool. I knew there had to be a better way!
List() will not work with found set and certainly not in same table on single field. You might want to read up on List() in FM Help.
Hi Chris, your method is sound however, instead of:
Set Variable ($vList ; $vList & ¶ & Table:Field )
Set Variable ($vList ; $vList & Table:Field & ¶ )
... why? Because if the variable is empty, it will only insert the field value to begin. If the field is not empty then you have already inserted the field value and carriage return then will be continuing. If you watch the two methods, your method will leave beginning blank line.
There is another scripted method, by Bruce Robertson, which uses the List function to build a multi-line variable list. It is a bit tricky to understand, but not to implement.
It involves using a Replace Field Contents script step, into a global field (important that it's global; it does not put the list into the global, but builds it in a variable). The list in the variable is built via the Let function. This is the (pseudo) calculation for the Replace.
Let ( $list = List ( $list; table::field ); "")
I've used this method for building lists in variables quite successfully in a number of different database files--using either a field or a variable as repository for the list being built. It avoids having an extra return at the beginning or end of a list--which is why I now recommend this approach.