Ok. so for example. A query runs containing field a, b, and c within each of 3 records. b's value is 1 for the first record, 2 for the second and 3 for the third. I want to be able to create 3 dynamic filenames in an xmlwrite (1.xml, 2.xml, 3.xml). I am using "foreach" logic. I am looking for the syntax..