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

Re: [Clip] add column array for more than 40 lines

Expand Messages
  • Pat
    ... clip ... Sweet! Thank you. Both clips are exactly what we needed. they even ignore ---- or line spacers! I mean encountering a dashed field doesn t
    Message 1 of 10 , May 11, 2006
    • 0 Attachment
      > > If you're still there and don't have a resolution yet here is a
      clip
      > > that works on the sample you sent.
      > >
      > > date tot id
      > > 05-08 54 mw
      > > 05-08 10 rn



      Sweet! Thank you. Both clips are exactly what we needed. they even
      ignore "----" or line spacers! I mean encountering a dashed field
      doesn't generate an error. wonderful. thank you.

      pat
    • Jody
      Hi Harvey, Thanks, son. :) I m glad you found the time to update the Clip. If you would like to make a tiny adjustment I ll replace the one you updated with
      Message 2 of 10 , May 11, 2006
      • 0 Attachment
        Hi Harvey,

        Thanks, son. :) I'm glad you found the time to update the Clip.
        If you would like to make a tiny adjustment I'll replace the one
        you updated with what is in my NoteBlock with your modified
        credit of course. :) What I would like to see is a popup wizard
        to ask which field/column number to add up. I know you know how
        to do that, so I won't waste time explaining how to. Thanks bro!
        (There are plenty of examples on how to do it in the Library
        anyway for others to look at if they wish.) From NoteTab's
        PasteBack feature/Clip:

        You might be interested in trying out my Library called NoteBlock
        which works specifically with delimited files. You can sort by
        fields (column), delete fields, reorder fields, replace in
        fields, and more... As always, use on a test document first to
        ensure there are no bugs and you should have a backup. ;)

        http://www.notetab.net/zip/noteblock.zip <-- Contains only the Library
        http://www.notetab.net/zip/noteblockbar.zip <-- Contains the Library plus
        Clipbar w/ buttons

        Block, field, and column are used interchangeably in the Library.

        > > Hi hsavage and Pat,
        > >
        > > From what I can tell, Harvey is correct. Yes, I know I wrote it,
        > > but don't have more time other than just glance at it. You would
        > > need to add a function to ^$GetField(Row;Col)$ but I don't have
        > > the time right now. You can easily use the feature to Modify |
        > > Block | Copy and Paste New then run the Clip to get the total. If
        > > this is something you do all the time, then maybe somebody will
        > > update it for you or I might find time sometime before 2007. ;)
        > >
        > > Go to Modify | Block and highlight Copy, then press F1 and read
        > > Help about the feature.


        Happy Clip'n!
        Jody

        All Lists: http://www.fookes.us/maillist.htm
        Convert your eMail programs... Aid4Mail: http://www.fookes.us/aid4mail

        Freeware and Shareware; some seamleesly integrates with NoteTab:
        http://www.sojourner.us/software

        See ya in the funnies!-) http://www.clean-funnies.com
      • hsavage
        ... Pat, I hadn t tested it with line breaks or dashed dividers, I should probably test further. -- ºvº 06.05.11_16.53 Did the aliens forget to remove your
        Message 3 of 10 , May 11, 2006
        • 0 Attachment
          Pat wrote:
          >> > If you're still there and don't have a resolution yet here is a
          > clip
          >> > that works on the sample you sent.
          >> >
          >> > date tot id
          >> > 05-08 54 mw
          >> > 05-08 10 rn
          >
          >
          >
          > Sweet! Thank you. Both clips are exactly what we needed. they even
          > ignore "----" or line spacers! I mean encountering a dashed field
          > doesn't generate an error. wonderful. thank you.
          >
          > pat

          Pat,

          I hadn't tested it with line breaks or dashed dividers, I should
          probably test further.

          --
          ºvº
          06.05.11_16.53
          "Did the aliens forget to remove your anal probe?"
          hrs ø hsavage@...
        • hsavage
          ... Jody, Here are 2 example modified clips based on your Add column Array for More Than 40 Line Maximum . The first clip is basically like yours, does any
          Message 4 of 10 , May 12, 2006
          • 0 Attachment
            Jody wrote:
            > Hi Harvey,
            >
            > Thanks, son. :) I'm glad you found the time to update the Clip.
            > If you would like to make a tiny adjustment I'll replace the one
            > you updated with what is in my NoteBlock with your modified
            > credit of course. :) What I would like to see is a popup wizard
            > to ask which field/column number to add up.
            >
            > http://www.notetab.net/zip/noteblock.zip <-- Contains only the Library
            > http://www.notetab.net/zip/noteblockbar.zip <-- Contains the Library plus
            > Clipbar w/ buttons
            >
            > Block, field, and column are used interchangeably in the Library.
            >
            > Happy Clip'n!
            > Jody

            Jody,

            Here are 2 example modified clips based on your "Add column Array for
            More Than 40 Line Maximum".

            The first clip is basically like yours, does any number of columns as
            long as they're in a discrete file with nothing else in the file. I
            fudged the index# by starting it at 'one', to compensate for a top row
            of column names. Change it if you like and instruct the user to avoid
            using column names with the clip.

            The second clip calculates the columns in place without the need of an
            external file. It operates only on the user selected rows and the user
            should avoid including line breaks or other text based dividers to
            separate rows.

            The calculations that sets the index# number and bottomline number are
            necessary so the prior selection can be made at any point in the file.

            I added options to select different column delimiters and different
            columns to calculate. I don't think there are any glaring errors in them.

            More bells and whistles could be added but these are very serviceable.

            <>·····Start First Clip·····<>
            H="Sum Array Full-column"
            ; noteblock.clb
            ; Last updated on 11-30-2004 by Jody Adair <Jody@...>
            ;_ Modified-Updated~Created_20060510
            ;_ hrs ø hsavage·pobox·com_12:01:56p
            ; will work best without any type of linebreaks or line separators
            ^!ClearVariable %TotalCount%
            ^!SetListDelimiter ^p
            ^!SetArray %LineList%=^$StrReplace("$";"";"^$GetText$";0;0)$
            ^!Set %Count%=^%LineList0%
            ^!Set %index%=1; %AddNumber%=0
            ;
            ^!Info [L]Carefully consider these entries, be sure to count columns and
            set delimiters correctly!^%nL%^%nL%It's best not to include line breaks
            or dividers such as, "----", they throw the linecount off and if you
            choose any column with a non-numeric entry the calculation will cause an
            ERROR.^%nL%^%nL%This ^!Info [L] command can be commented out when you
            choose.
            ^!Set %delim%=^?{(H=6)Pick individual Row
            delimiter==Colon^=^%colon%|Semi-Colon^=^%sc%|_Space^=^%space%|Tab^=^%tab%|vBar^=^%vbar%};
            %col2tot%=^?{Enter column number to total=3}
            ;
            ^!SetDelimiter ^%delim%
            :LOOP
            ^!Inc %index%
            ^!If ^%index% > ^%Count% SHOWCOUNT
            ^!Set %AddNumber%=^$Calc(^$GetField(^%index%;^%col2tot%)$+^%AddNumber%)$
            ^!Set %TotalCount%=^%AddNumber%
            ^!Goto LOOP
            ;
            :SHOWCOUNT
            ^!Info [L]Total number of lines = ^$Calc(^%Count%-2)$^pTotal number
            count = ^%TotalCount%
            <>·····End First Clip·····<>


            <>····Start Second Clip····<>
            H="Sum Array Partial-Column"
            ; noteblock.clb
            ; Last updated on 11-30-2004 by Jody Adair <Jody@...>
            ;_ Modified-Updated~Created_20060511
            ;_ hrs ø hsavage·pobox·com_07:14:19p
            ; will work best without any type of linebreaks or line separators
            ^!ClearVariable %TotalCount%
            ^!If ^$GetSelSize$ < 28 NEXT ELSE SKIP_3
            ^!StatusShow Minimum of 2 Full rows must be SELECTED!
            ^!Delay 40
            ^!Goto END
            ^!Info [L]Carefully consider these entries, be sure to count columns and
            set delimiters correctly!^%nL%^%nL%It's best not to include line breaks
            or dividers such as, "----", they throw the linecount off and if you
            choose any column with a non-numeric entry the calculation will cause an
            ERROR.^%nL%^%nL%This ^!Info [L] command can be commented out when you
            choose.
            ^!Set %delim%=^?{(H=6)Pick individual Row
            delimiter==Colon^=^%colon%|Semi-Colon^=^%sc%|_Space^=^%space%|Tab^=^%tab%|vBar^=^%vbar%};
            %col2tot%=^?{Enter column number to total=3}
            ;
            ^!SetListDelimiter ^p
            ^!SetArray %linelist%=^$StrReplace("$";"";"^$GetSelection$";0;0)$
            ^!Set %count%=^%linelist0%; %index%=^$Calc(^$GetRowStart$-1)$
            ^!Set %bottomline%=^$GetRowEnd$; %addnumber%=0
            ;
            ^!SetDelimiter ^%delim%
            :LOOP
            ^!Inc %index%
            ^!If ^%index% = ^%bottomline% SHOWCOUNT
            ^!Set %addnumber%=^$Calc(^$GetField(^%index%;^%col2tot%)$+^%addnumber%)$
            ^!Set %totalcount%=^%addnumber%
            ^!Goto LOOP
            ;
            :SHOWCOUNT
            ^!Info [L]Total Numbers Added = ^$Calc(^%count%-1)$^pTotal of Rows
            Added = ^%totalcount%
            <>·····End Second Clip ·····<>

            ºvº
            06.05.12_18.17
            "Driving a Car Safely; A Skill You 'CAN' Acquire."
            hrs ø hsavage@...
          • Jody
            Hi Harvey, I ll add the Clips someday when we get done testing everything that s going on right now with Fookes Software. I ll post a message/reply when I
            Message 5 of 10 , May 15, 2006
            • 0 Attachment
              Hi Harvey,

              I'll add the Clips someday when we get done testing everything
              that's going on right now with Fookes Software. I'll post a
              message/reply when I upload the updated files.

              > > http://www.notetab.net/zip/noteblock.zip <-- Contains only the Library
              > > http://www.notetab.net/zip/noteblockbar.zip <-- Contains the Library plus
              > > Clipbar w/ buttons
              > >
              > > Block, field, and column are used interchangeably in the Library.
              >
              >Jody,
              >
              >Here are 2 example modified clips based on your "Add column Array for
              >More Than 40 Line Maximum".
              >
              >The first clip is basically like yours, does any number of columns as
              >long as they're in a discrete file with nothing else in the file. I
              >fudged the index# by starting it at 'one', to compensate for a top row
              >of column names. Change it if you like and instruct the user to avoid
              >using column names with the clip.
              >
              >The second clip calculates the columns in place without the need of an
              >external file. It operates only on the user selected rows and the user
              >should avoid including line breaks or other text based dividers to
              >separate rows.
              >
              >The calculations that sets the index# number and bottomline number are
              >necessary so the prior selection can be made at any point in the file.
              >
              >I added options to select different column delimiters and different
              >columns to calculate. I don't think there are any glaring errors in them.
              >
              >More bells and whistles could be added but these are very serviceable.
              >
              ><>·····Start First Clip·····<>
              >H="Sum Array Full-column"
              >; noteblock.clb
              >; Last updated on 11-30-2004 by Jody Adair <Jody@...>
              >;_ Modified-Updated~Created_20060510
              >;_ hrs ø hsavage·pobox·com_12:01:56p
              >; will work best without any type of linebreaks or line separators
              >^!ClearVariable %TotalCount%
              >^!SetListDelimiter ^p
              >^!SetArray %LineList%=^$StrReplace("$";"";"^$GetText$";0;0)$
              >^!Set %Count%=^%LineList0%
              >^!Set %index%=1; %AddNumber%=0
              >;
              >^!Info [L]Carefully consider these entries, be sure to count columns and
              >set delimiters correctly!^%nL%^%nL%It's best not to include line breaks
              >or dividers such as, "----", they throw the linecount off and if you
              >choose any column with a non-numeric entry the calculation will cause an
              >ERROR.^%nL%^%nL%This ^!Info [L] command can be commented out when you
              >choose.
              >^!Set %delim%=^?{(H=6)Pick individual Row
              >delimiter==Colon^=^%colon%|Semi-Colon^=^%sc%|_Space^=^%space%|Tab^=^%tab%|vBar^=^%vbar%};
              >%col2tot%=^?{Enter column number to total=3}
              >;
              >^!SetDelimiter ^%delim%
              >:LOOP
              >^!Inc %index%
              >^!If ^%index% > ^%Count% SHOWCOUNT
              >^!Set %AddNumber%=^$Calc(^$GetField(^%index%;^%col2tot%)$+^%AddNumber%)$
              >^!Set %TotalCount%=^%AddNumber%
              >^!Goto LOOP
              >;
              >:SHOWCOUNT
              >^!Info [L]Total number of lines = ^$Calc(^%Count%-2)$^pTotal number
              >count = ^%TotalCount%
              ><>·····End First Clip·····<>
              >
              >
              ><>····Start Second Clip····<>
              >H="Sum Array Partial-Column"
              >; noteblock.clb
              >; Last updated on 11-30-2004 by Jody Adair <Jody@...>
              >;_ Modified-Updated~Created_20060511
              >;_ hrs ø hsavage·pobox·com_07:14:19p
              >; will work best without any type of linebreaks or line separators
              >^!ClearVariable %TotalCount%
              >^!If ^$GetSelSize$ < 28 NEXT ELSE SKIP_3
              >^!StatusShow Minimum of 2 Full rows must be SELECTED!
              >^!Delay 40
              >^!Goto END
              >^!Info [L]Carefully consider these entries, be sure to count columns and
              >set delimiters correctly!^%nL%^%nL%It's best not to include line breaks
              >or dividers such as, "----", they throw the linecount off and if you
              >choose any column with a non-numeric entry the calculation will cause an
              >ERROR.^%nL%^%nL%This ^!Info [L] command can be commented out when you
              >choose.
              >^!Set %delim%=^?{(H=6)Pick individual Row
              >delimiter==Colon^=^%colon%|Semi-Colon^=^%sc%|_Space^=^%space%|Tab^=^%tab%|vBar^=^%vbar%};
              >%col2tot%=^?{Enter column number to total=3}
              >;
              >^!SetListDelimiter ^p
              >^!SetArray %linelist%=^$StrReplace("$";"";"^$GetSelection$";0;0)$
              >^!Set %count%=^%linelist0%; %index%=^$Calc(^$GetRowStart$-1)$
              >^!Set %bottomline%=^$GetRowEnd$; %addnumber%=0
              >;
              >^!SetDelimiter ^%delim%
              >:LOOP
              >^!Inc %index%
              >^!If ^%index% = ^%bottomline% SHOWCOUNT
              >^!Set %addnumber%=^$Calc(^$GetField(^%index%;^%col2tot%)$+^%addnumber%)$
              >^!Set %totalcount%=^%addnumber%
              >^!Goto LOOP
              >;
              >:SHOWCOUNT
              >^!Info [L]Total Numbers Added = ^$Calc(^%count%-1)$^pTotal of Rows
              >Added = ^%totalcount%
              ><>·····End Second Clip ·····<>
              >
              > ºvº
              > 06.05.12_18.17
              > "Driving a Car Safely; A Skill You 'CAN' Acquire."
              > hrs ø





              Happy Clip'n!
              Jody

              All Lists: http://www.fookes.us/maillist.htm
              Convert your eMail programs... Aid4Mail: http://www.fookes.us/aid4mail

              Freeware and Shareware; some seamleesly integrates with NoteTab:
              http://www.sojourner.us/software

              See ya in the funnies!-) http://www.clean-funnies.com
            Your message has been successfully submitted and would be delivered to recipients shortly.