Reputation: 319
I want to save a value in a file with Uniface. What is the easiest way to do this? I also want all following values to be appended to the content of the file, separated by commas.
Upvotes: 0
Views: 20
Reputation: 319
The easiest way to save to a file and append the subsequent values to the file is as follows:
filedump/append "%%FIELD.ENTITY%%%", "file_path", "CharacterSet"
Example:
filedump/append "%%NAME.PERSON%%%", "C:\Temp\export.txt", "LATIN9"
If you want to save the value directly to the file, you should use the flush method.
flush "file_path"
Example:
flush "C:\Temp\export.txt"
This can be useful if your program terminates and you still want to see the contents of the file, even if it has not been completely created.
When using flush, make sure that the path to the file is specified correctly, otherwise the values will not be saved if the program is aborted.
See Uniface Documentation for filedump for more informations: https://docs.rocketsoftware.com/bundle/uniface_104/page/bbd1720022831397.html
Upvotes: 0