3 Replies Latest reply on Oct 30, 2012 3:13 PM by user17305

    importing text file name and contents

    user17305

      Title

      importing text file name and contents

      Post

           I am trying to import a text file name into a field along with the text file contents.  The text file contents come in just fine as tab delineated entries into their own fields in a record, with each text line going into a new record.  I want to add a field in each record that contains the file name that the record contents came from.

           I am getting stuck becuase I do not know how to get the file name into more than one record.  Each record needs to get the same filename along with the tab delineated line from that text file.

           Any help would be appreciated and hopefully help me to save some time.

        • 1. Re: importing text file name and contents
          MarcMcCall

               If you have a script that does the import you can add these steps

               Set Variable: $$FileName   Value://Your FileNameFieldhere

               After the import is finished 

               Replace Field Contents   Target Field: //Your FileNameFieldhere  Specify Calculation: $$FileName 

               Make sure the found count stays the same while this happens, and it will only put the file name in the records you just imported.

          • 2. Re: importing text file name and contents
            philmodjunk

                 Immediately after importing, the newly added records will form a "found set" of records. Replace Field Contents can then be used to assign a value to a field in every record in this found set.

                 This is a very powerful "batch update" tool that cannot be undone, so look it up in help before using and make a back up copy before you try it out just in case you don't get the results you expected.

            • 3. Re: importing text file name and contents
              user17305

                   Thanks guys for guiding me in this direction.  I hope to get back to this problem and prototype something within the next few days and see what happens.
                   I appreciate the help!