How do I Display Tab Delimited Text in a Table Field?
This lesson will show you how to display tab delimited text in a Revolution table field.
What We Will Work With
On the left is a stack window with a button for selecting a text file (1) and a field for displaying the text file (2).
On the right is a file (3) containing two columns of data. The left column is the name of a cheese (4) and the right column is a year (5). The two columns are separated by the TAB character (6).
The Button Script
The button script is pretty straight forward. It simply prompts the user for a file, loads the file contents into a variable and then assigns the variable to the text property of the field.
Copy & Paste
answer file "Select text file"
if the result is not "cancel" then
put it into theFilePath
put URL ("file:" & theFilePath) into theTabDelimitedText
set the text of field "MyText" to theTabDelimitedText