> In Applescript, this of course works fine:
> 
> set filePath to "disk:folder:file"
> set f to (open for access file filePath with write permission)
> write theText to f
> close access f

As an alternative you can use the shell script method

Copy cell "Whatever" of current record to theText

Set theCommand to "echo " & quoted form of theText & " >
~/desktop/myfile.txt"

Do shell script theCommand