I'm trying to write a function to export data to a text file. Simple enough hey?
Well, I want to keep it generic because it will be used to export many different documents with a different number of fields (based on a 'profile' document where the fields are specified.) The problem is that I can't pass a variant to the "Write filenum#, var()"
Is there any way to export to a file using LScript when you don't know the number of fields?
I thought of exploding the variant using an evaluate command but that wont work as the "Write" will surround the entire exploded string within quotes.
Basically I want to:
Write filenum#, var(0), var(1), var(..n)
where 'n' is not known at compile time.