3 Replies Latest reply: May 15, 2014 9:59 AM by shibu ninan RSS

    Field Data Duplicates from Last trapped Append Line for a Previous Record

    Gary Raymond

      I have a report file that contains a variable set of fields for each data record.  With the exception of the first line each variable is on a separate line preceded by unique keyword string. 

       

      (See the sample below.  I've added a letter for the template type preceding each line to be used.  Each record group is separated with dashes.)

       

      The problem is that a field for a record that is missing a particular template will duplicate the field value from a previous record that had a valid value.

       

      For example below,  the "time to abandon" field value for the page 12 record is duplicated in the next record. And in the page 13 record the "Answered by", "Time to answer" and "Total talk time" fields are duplicated in the page 14 record.  And so on...

       

      I'm sure I am missing something basic here.  Can you advise.

      Thanks,

      --Gary

       

        -


      H Internal Call on 08/25/2003

      H Overview

      A From: x4211

      A To: x4206

      A Time to abandon: 00:00:05

        Details

      A Start 14:37:14

        14:37:14 S Started 0:00:00 4211

        14:37:14 R Ringing 0:00:05 4206

      A End 14:37:19

      A Total Duration 0:00:05

      D Page 12

        -


       

      H Internal Call on 08/25/2003

      H Overview

      A From: x4211

      A To: x4289

      A Answered by: x4289

      A Time to answer: 00:00:02

      A Total talk time: 00:00:05

        Details

      A Start 11:59:35

        11:59:35 S Started 0:00:00 4211

        11:59:35 R Ringing 0:00:02 x4289

        11:59:37 C Connected 0:00:05 x4289

      A End 11:59:42

      A Total Duration 0:00:07

      D Page 13

        -


       

      H Internal Call on 08/25/2003

      H Overview

      A From: x4211

      A To: x5260

      A Time to abandon: 00:00:10

        Details

      A Start 14:39:59

        14:39:59 S Started 0:00:00 4211

        14:39:59 R Ringing 0:00:10 x5260

      A End 14:40:09

      A Total Duration 0:00:10

      D Page 14

        -


      H Internal Call on 08/25/2003

      H Overview

      A From: x4211

      A To: x5252

      A Answered by: x5252

      A Time to answer: 00:00:11

      A Total talk time: 00:00:00

        Details

      A Start 16:50:04

        16:50:04 S Started 0:00:00 4211

        16:50:04 R Ringing 0:00:11 x5252

        16:50:15 C Connected 0:00:00 x5252

      A End 16:50:15

      A Total Duration 0:00:11

      D Page 15

        -


      H Internal Call on 08/25/2003

      H Overview

      A From: x4211

      A To: x5260

      A Time to abandon: 00:00:13

        Details

      A Start 16:49:48

        16:49:48 S Started 0:00:00 4211

        16:49:48 R Ringing 0:00:13 x5260

      A End 16:50:01

      A Total Duration 0:00:13

      D Page 16

        -


       

        • Field Data Duplicates from Last trapped Append Line for a Previous Record
          Grant Perkins

          Gary,

           

          After a very quick look I think you would be better making your A lines the Detail (or at least some of them) and your D line a footer.

           

          Your H lines could probably survive as H lines but an A line looks like it would also work.

           

          You do have a couple of tricky things to deal with, like the 'Time to Abandon' field. That can be dealt with by means of a "Preceeding String" type field. The associated variability with the S, R and C lines in the "Start" section below it may be a little more challenging.

           

          Thinking aloud, worst case due to lack of unique preceeding strings - if you can capture the "Start" section as a multi-line field, thereby dealing with the variable number of lines, you could then break out the data using calculations. I assume that you may need to do that for some purpose. I say this given that some of the report already provides a summary analysis of the detail lines. You may not need the detail. Or you may not need the summary fields since they can be reconstructed from the detail when further analysis is performed. As an integral part of a Monarch summary for example.

           

          I hope these thought help. I will try to play around a little, using your sample, later today or tomorrow.

           

          Grant

           

           

          Originally posted by Gary Raymond:

          I have a report file that contains a variable set of fields for each data record.  With the exception of the first line each variable is on a separate line preceded by unique keyword string. 

           

          (See the sample below.  I've added a letter for the template type preceding each line to be used.  Each record group is separated with dashes.)

           

          The problem is that a field for a record that is missing a particular template will duplicate the field value from a previous record that had a valid value.

           

          For example below,  the "time to abandon" field value for the page 12 record is duplicated in the next record. And in the page 13 record the "Answered by", "Time to answer" and "Total talk time" fields are duplicated in the page 14 record.  And so on...

           

          I'm sure I am missing something basic here.  Can you advise.

          Thanks,

          --Gary

           

            -


          H Internal Call on 08/25/2003

          H Overview

          A From: x4211

          A To: x4206

          A Time to abandon: 00:00:05

            Details

          A Start 14:37:14

            14:37:14 S Started 0:00:00 4211

            14:37:14 R Ringing 0:00:05 4206

          A End 14:37:19

          A Total Duration 0:00:05

          D Page 12

            -


           

          H Internal Call on 08/25/2003

          H Overview

          A From: x4211

          A To: x4289

          A Answered by: x4289

          A Time to answer: 00:00:02

          A Total talk time: 00:00:05

            Details

          A Start 11:59:35

            11:59:35 S Started 0:00:00 4211

            11:59:35 R Ringing 0:00:02 x4289

            11:59:37 C Connected 0:00:05 x4289

          A End 11:59:42

          A Total Duration 0:00:07

          D Page 13

            -


           

          H Internal Call on 08/25/2003

          H Overview

          A From: x4211

          A To: x5260

          A Time to abandon: 00:00:10

            Details

          A Start 14:39:59

            14:39:59 S Started 0:00:00 4211

            14:39:59 R Ringing 0:00:10 x5260

          A End 14:40:09

          A Total Duration 0:00:10

          D Page 14

            -


          H Internal Call on 08/25/2003

          H Overview

          A From: x4211

          A To: x5252

          A Answered by: x5252

          A Time to answer: 00:00:11

          A Total talk time: 00:00:00

            Details

          A Start 16:50:04

            16:50:04 S Started 0:00:00 4211

            16:50:04 R Ringing 0:00:11 x5252

            16:50:15 C Connected 0:00:00 x5252

          A End 16:50:15

          A Total Duration 0:00:11

          D Page 15

            -


          H Internal Call on 08/25/2003

          H Overview

          A From: x4211

          A To: x5260

          A Time to abandon: 00:00:13

            Details

          A Start 16:49:48

            16:49:48 S Started 0:00:00 4211

            16:49:48 R Ringing 0:00:13 x5260

          A End 16:50:01

          A Total Duration 0:00:13

          D Page 16

            -


          /b[/quote]

          • Field Data Duplicates from Last trapped Append Line for a Previous Record
            Grant Perkins

            Gary,

             

            I have a model that works based on your sample data (assuming that some of the 'detail' fields have left shifted in editing?).

             

            As suggested previously I have picked the problem detail lines as one multi-line field. Will be easy to LSPLIT it into what you require.

             

            Some 'trick' work with preceeding string fields, as previously suggested, to deal with the other "may or may not appear" data. Therefore easiest to send you the model (and the 'source' file I used just in case the re-format is a little different to yours). Send me a Private Message with an email address and I will forward, hopefully by the end of today though we do have time zones and some other stuff that may mean I am unable to send it by the end of your day.

             

            If it works one of us can write it up for the benefit of forum visitors!

             

            Best regards,

             

            Grant

             

            [size="1"][ September 11, 2003, 06:01 AM: Message edited by: Grant Perkins ][/size]

            • Field Data Duplicates from Last trapped Append Line for a Previous Record
              shibu ninan

               

               

              [size="1"][ September 26, 2003, 02:07 PM: Message edited by: shibu ninan ][/size]