CityDesk 2.0-Documentation
Text Between Items in LoopsSometimes it's useful to specify text which will appear between any two items in a forEach loop. This can be done by adding a {$ between $} section to your loop.
For example, suppose we had a folder named People containing these items:
If we want to list them all with commas between them, we can use the following CityScript code:
{$ foreach x in (folder "People") $}
{$ x.fileName $}{$ between $}, {$next$}That will produce:
Ivan Smith, Joe Nguyen, Ken Thomas, Lester Johnson, Moe Williams, Norm Wang, Ollie Lee, Peter Stephenopoulous
Notice there is no comma after the last item, which is the brilliant thing about using between.
©Copyright 2001-2003 Fog Creek Software, Inc. All Rights Reserved.