Loading ...
Sorry, an error occurred while loading the content.
 

GetField- CSV files

Expand Messages
  • hsavage
    Hi ALL, I need input from the experienced clippers about ^$GetField(xxx)$ function in clips. I have a small file of about 30 lines, 3 comma delimited columns,
    Message 1 of 5 , Sep 15, 2002
      Hi ALL,

      I need input from the experienced clippers about ^$GetField(xxx)$
      function in clips.

      I have a small file of about 30 lines, 3 comma delimited columns,
      columns are not uniform width, and I've tried about 300 different
      methods to pull out the first 2 columns, individually, and assign them
      to variables, as in an array. The best I've done is a single line with
      3 comma separated fields.

      Is it me or maybe the ^$GetField(x)$ function, doesn't.

      Apparently, I haven't hit on the correct combination yet. A correct
      answer would be greatly appreciated but any help would be appreciated.

      hrs
    • Jody
      Hi Harvey, It may be as simple as using ^!SetDelimiter (not SetListDelimiter). I still have not got around to updating my NoteBlock Library to use arrays, but
      Message 2 of 5 , Sep 16, 2002
        Hi Harvey,

        It may be as simple as using ^!SetDelimiter (not SetListDelimiter).
        I still have not got around to updating my NoteBlock Library to use
        arrays, but it still has a lot of useful Clips in it for working with delimited files. You sure enough can see how ^$GetField(...;...)$ is
        used with it. Clips are already there to do what you want.

        http://www.notetab.net/html/library.htm
        I think this is the download:
        http://www.notetab.net/zip/noteblock.zip

        >I have a small file of about 30 lines, 3 comma delimited columns,
        >columns are not uniform width, and I've tried about 300 different
        >methods to pull out the first 2 columns, individually, and assign
        >them to variables, as in an array. The best I've done is a
        >single line with 3 comma separated fields.
        >
        >Is it me or maybe the ^$GetField(x)$ function, doesn't.


        Happy Clip'n!
        Jody

        http://www.notetab.net

        Subscribe, UnSubscribe, Options
        mailto:Ntb-Clips-Subscribe@yahoogroups.com
        mailto:Ntb-Clips-UnSubscribe@yahoogroups.com
        http://groups.yahoo.com/group/ntb-clips
      • Don Passenger
        gosh, Jody has a library for playing with csv files which as I recall allows you to do just such things check his pages and see if you can hunt up his stuff
        Message 3 of 5 , Sep 16, 2002
          gosh, Jody has a library for playing with csv files which as I recall allows
          you to do just such things
          check his pages and see if you can hunt up his stuff
          last time I was struggling with stuff like that I learned a lot from his
          clips ... which are now fairly old, but still very functional

          ----- Original Message -----
          From: "hsavage" <hsavage@...>
          To: "ntb-clips" <ntb-clips@yahoogroups.com>
          Sent: Monday, September 16, 2002 2:40 AM
          Subject: [Clip] GetField- CSV files


          > Hi ALL,
          >
          > I need input from the experienced clippers about ^$GetField(xxx)$
          > function in clips.
          >
          > I have a small file of about 30 lines, 3 comma delimited columns,
          > columns are not uniform width, and I've tried about 300 different
          > methods to pull out the first 2 columns, individually, and assign them
          > to variables, as in an array. The best I've done is a single line with
          > 3 comma separated fields.
          >
          > Is it me or maybe the ^$GetField(x)$ function, doesn't.
          >
          > Apparently, I haven't hit on the correct combination yet. A correct
          > answer would be greatly appreciated but any help would be appreciated.
          >
          > hrs
        • hsavage
          º Jody wrote: º º Hi Harvey, º º It may be as simple as using ^!SetDelimiter (not SetListDelimiter). º I still have not got around to updating my
          Message 4 of 5 , Sep 16, 2002
            º Jody wrote:
            º
            º Hi Harvey,
            º
            º It may be as simple as using ^!SetDelimiter (not SetListDelimiter).
            º I still have not got around to updating my NoteBlock Library to use
            º arrays, but it still has a lot of useful Clips in it for working with
            delimited files. You sure enough can see how ^$GetField(...;...)$ is
            º used with it. Clips are already there to do what you want.
            º
            º Is it me or maybe the ^$GetField(x)$ function, doesn't.

            Jody,

            You nailed it with the first guess. I removed 'List' from
            'SetDelimiter' and it worked as expected on first run.

            So you won't think I'm a complete goof, I had tried that before, must
            have been about attempt 45, one, or some, of my 'commands, functions, or
            parameters' must have been wrong and it didn't work at that time.

            As I said in the original email, correct answers are 'greatly appreciated'.

            hrs
          • Jody
            Hi Harvey, ... Been there; done that!-) ... Never did - you write some complex Clips. ... Been there; done that!-) ... You are most welcome; where s the Clip?
            Message 5 of 5 , Sep 16, 2002
              Hi Harvey,

              >> It may be as simple as using ^!SetDelimiter (not
              >> SetListDelimiter). I still have not got around to updating my
              >> NoteBlock Library to use arrays, but it still has a lot of
              >> useful Clips in it for working with delimited files.
              >> http://www.notetab.net/zip/noteblock.zip
              >
              > You nailed it with the first guess. I removed 'List' from
              > 'SetDelimiter' and it worked as expected on first run.

              Been there; done that!-)

              > So you won't think I'm a complete goof,

              Never did - you write some complex Clips.

              > I had tried that before, must have been about attempt 45, one,
              > or some, of my 'commands, functions, or parameters' must have
              > been wrong and it didn't work at that time.

              Been there; done that!-)

              > As I said in the original email, correct answers are 'greatly
              > appreciated'.

              You are most welcome; where's the Clip? :) Please copy the
              scripts list for its archives. See my signature line to
              subscribe to it. TIA

              Happy Script'n!
              Jody Adair

              UnSubscribe, Options
              mailto:ntb-Scripts-UnSubscribe@yahoogroups.com
              http://groups.yahoo.com/group/ntb-clipclass

              The NoteTabbers Assistant Page
              http://www.notetab.net
            Your message has been successfully submitted and would be delivered to recipients shortly.