Appending Data to a text file
Posted: Tue Oct 03, 2023 5:33 pm
Hi,
I had this working on an older project but that was somehow tossed into the never to be seen again space.
I am trying to put several fields on a page into a csv text file.
Here is the code I am using:
on mouseUp
open file specialFolderPath("documents/Vipw/") & "tLine5.txt" for append
put fld"LN5" & "," & fld"expDate5" & "," & the Label of btn"M5" & "," & Fld"IC5" & "," & fld"5Q" & "," & fld"Date5" & "," & fld"Init5" & "," & fld"LN5QTYINV" & cr into tData
answer tData
write tData to file specialFolderPath("documents/Vipw/") & "tLine5.txt"
go cd"MainMenu"
end mouseUp
I am using the answer statement to make sure the data is actually getting into the tData variable correctly. It is and once
I get this working I will remove it.
The write statement is not working. Nothing gets added to the tLine5.txt file.
I am trying to save the data in a file that can be eventually printed out when needed.
Thanks ahead of time for the answer to my problem
Tom
I had this working on an older project but that was somehow tossed into the never to be seen again space.
I am trying to put several fields on a page into a csv text file.
Here is the code I am using:
on mouseUp
open file specialFolderPath("documents/Vipw/") & "tLine5.txt" for append
put fld"LN5" & "," & fld"expDate5" & "," & the Label of btn"M5" & "," & Fld"IC5" & "," & fld"5Q" & "," & fld"Date5" & "," & fld"Init5" & "," & fld"LN5QTYINV" & cr into tData
answer tData
write tData to file specialFolderPath("documents/Vipw/") & "tLine5.txt"
go cd"MainMenu"
end mouseUp
I am using the answer statement to make sure the data is actually getting into the tData variable correctly. It is and once
I get this working I will remove it.
The write statement is not working. Nothing gets added to the tLine5.txt file.
I am trying to save the data in a file that can be eventually printed out when needed.
Thanks ahead of time for the answer to my problem
Tom