dynamic import types
Brian K. White
bkw at aljex.com
Mon Apr 24 16:21:15 PDT 2017
If: api_data_format eq "csv"
Then: import word idf = (impFile)
If: api_data_format eq "pipe_delimited"
Then: import ascii idf = (impFile) f=| r=\n
If: api_data_format eq "tab_delimited"
Then: import ascii idf = (impFile) f=\t r=\n
import ascii idf = (impFile) f=| r=\n
^
Merge name incompatibility.
Word processor or spreadsheet merge has been given two different names.
Dangit, is there a nice way around this or do I have to give up on this
idea and just pick one?
I mean yeah I suppose I could write 3 tiny tables and CALL the right
one, or write out a temp version of the full table and chain to it or
something, but I mean short of unnecessarily Goldbergian things like
that. Actually the call idea might not be too bad after all, as long as
no one else is CALLing this table itself, which I am pretty sure about
but not 100% sure about. It does contain some comments that imply
passing long variables back to a parent, but that could just be poorly
written comments, especially since they appear above a stack of explicit
DECLARE LOCAL, hello, local... not extern or global or unspecified.
Anyway not interesting, sorry.
Then: declare fpit, fpid
If: api_data_format eq "csv"
Then: fpit = "word" ; fpid = ""
If: api_data_format eq "pipe_delimited"
Then: fpit = "ascii" ; fpid = "f=| r=\n"
If: api_data_format eq "tab_delimited"
Then: fpit = "ascii" ; fpid = "f=\t r=\n"
If:
Then: import (fpit) idf = (impFile) (fpid)
import (fpit) idf= (impFile) (fpid)
^
Process contains a syntax error at position indicated.
...I guess not that way ;) I kind knew that wouldn't work, just worth a
shot since it was easy to try.
... well, I am receiving these data files via php cgi script, so I can
do the translation both ways in there, the same way I'm already doing
for line endings. Take in whatever, feed only one consistent format to
filepro. This would just be more of the same. So I guess it's no loss to
pick one format for use inside the table after all. The exterior facing
api would still allow any, which is all that matters.
--
bkw
More information about the Filepro-list
mailing list