Participant
March 19, 2024
Question
this.importTextData(); not working, but manual import works fine
- March 19, 2024
- 2 replies
- 1440 views
It has been three weeks and I have searched all over for an answer.
- I have a set of TXT files that are autogenerated every day from our electronic medical records sofware.
- The filenames are dynamic (<formtype><office><date>.txt), soI'm requiring the end-user to manually select the files.
- There are two rows:
- The column headers - matching all form field names (row 1 in Excel)
- The field values - row "0" (row 2 in Excel)
When I import them through "Forms->Manage Data->Import Data", they work flawlessly and don't even require row selection. I created a simple button with :
this.importTextData();It allows me to select the file and then nothing happens. In the debugger, I get a return value of "1". To test, I edited to add the path and filename in a trusted folder-level script. This imports fine, but there may be as many as 20 .of these TXT files and it would cause big mistakes if the wrong office or date was selected.
What am I doing wrong?
