• Just advice on how to do this?

    Would I need to first select a distinct list of Orderid's then pass this to the foreach loop container?

    Not sure then how it would know which id it is going to use then when creating the file and if the results in the file relates to the same text file?