5 Replies Latest reply on Nov 14, 2013 11:52 AM by philmodjunk

    Import script would previously accept .txt in fp5 but now will only accept .tab

    V

      Title

      Import script would previously accept .txt in fp5 but now will only accept .tab

      Post


           I'm upgrading some /ancient/ fp5 dbs to fmp11 (we'll be moving to 12 soon, but still in the works). 

           The fp5 script would accept a tab delimited file with a .txt extension (the file in question is from a system that is out of our hands), but now it requires a .tab extension.  There's no easy way to programmatically change the .txt to .tab, so is there a setting in fp11 that'll disregard the extension and simply recognize the file type?

           These DBS and associated layouts and scripts have 0 documentation, and I'm pretty much a n00b, so I'm more or less flying blind.  :-/

           Suggestions, folks?

        • 1. Re: Import script would previously accept .txt in fp5 but now will only accept .tab
          philmodjunk

               There shouldn't be a problem. On my windows 7 system, I opened MS Word, entered the word "Test" and saved it as a text file with the .txt option. I then opened a .fp7 file with FIleMaker 11 and selected Import Records | File from the File menu. I was able to select for "tab separated files, .tab or .txt". I could see my newly created text file and select it for import.

          • 2. Re: Import script would previously accept .txt in fp5 but now will only accept .tab
            V

                 Hrm.  This is a script doing the import.  When the file name is .txt, it bombs.  change the file extension to .tab, it works fine.  Very odd.

                 I'll check more around, but if you think of anything else, please let me know.

            • 3. Re: Import script would previously accept .txt in fp5 but now will only accept .tab
              philmodjunk

                   What does "it bombs" mean exactly?

                   How did you set up your import records script step? What does the file reference for the step look like?

              • 4. Re: Import script would previously accept .txt in fp5 but now will only accept .tab
                V

                     Hrm.. it gives the error "This file could not be translated using the selected file type"  

                     The file reference, if I understand you, is manually selected during the import script.

                     I'm not sure I understand what you mean by 'set up import records script step'..

                     The actual import step has 

                     'run with full access privileges'

                     specify import order -> Char set: Windows ANSI / Arrange by 'last order' / Import action 'Add new records' and when prompted for Import Options, I've tried both 'Perform auto-enter' and not.  

                     If you can offer any more guidance, I'd be more than happy to provide whatever info you can use.  Thanks much for taking this time to help me.  I've been struggling with this for many hours.

                      

                • 5. Re: Import script would previously accept .txt in fp5 but now will only accept .tab
                  philmodjunk

                       Import records can be set up a number of different ways in a script. There are numerous options you might choose and a key one is how you specify what file to import from. The script could pause and open a dialog for you to select a file, it can use data in a field to find a file and import from that file or it can be "hard wired" to a specific file and location on your computer.

                       I think you need to post the relative portion of your script in order to show all the options that you have selected for your import records script step.

                       To post a script to the forum:

                         
                  1.           You can upload a screen shot of your script by using the Upload an Image controls located just below Post A Answer.
                  2.      
                  3.           You can print a script to a PDF, open the PDF and then select and copy the script as text from the opened PDF to your clipboard for pasting here. (with this approach, you can get multiple script steps on the same line, please edit the pasted text by inserting some returns to separate those steps.)
                  4.      
                  5.           If You have FileMaker Advanced, you can generate a database design report and copy the script as text from there.
                  6.      
                  7.           If you paste a text form of the script, you can use the Script Pretty box in the Known Bugs List database to paste a version that is single spaced and indented for a more professional and easier to read format.