3 Replies Latest reply: May 15, 2014 9:57 AM by Grant Perkins RSS

    Creating Arrays from Mutliple Records

    MDP _

      Hello,

       

      I was hoping for some guidance in how best to combine multiple records into an Array or other structure that will allow the data to be combined.

      this is similar to the structure I would like to work with:

           Field1     Field2     Field3     Field4     Idx

           AA     abc

           AA          def

           BB          456       

           BB     123

      BB                    789

       

      New Table/Array/Container would be

       

           Field1     Field2     Field3     Field4     Idx

           AA     abc     def

           BB     123     456     789

       

      I hope this makes sense.  I am new to Monarch, and have been looking at all the references I can find.  I am concerned that is it too easy, and that I can't think out fo the box for the solution.  Any help would be greatly appreciated.

       

      Mark

        • Creating Arrays from Mutliple Records
          Grant Perkins

          this is similar to the structure I would like to work with:

           

          [font="courier"]     Field1     Field2     Field3     Field4     Idx

               AA     abc

               AA          def

               BB          456       

               BB     123

                  BB               789

           

          New Table/Array/Container would be

           

               Field1     Field2     Field3     Field4     Idx

               AA     abc     def

               BB     123     456     789[/font][/quote]I hope this makes sense. 

           

          Mark /QB[/quote]Mark,

           

          Acception that field 1 is the key for the summary it looks like the other fields have no relationship to each other other than through Field 1. Is that the case?

           

          If so, how many values might there be for Fierlds 2 and onwards in the array and what purpose are you seeking to satisfy with this format?

           

          For the sample could imagine looking to do something with the Multi Column Region functionality (assuming you have Monarch V7 or higher?) and then the Summary functionality. However unless the entire report is about as simply as you have outlined I doubt it would be a practical solution.

           

          I may have missed something?

           

          Grant

          • Creating Arrays from Mutliple Records
            MDP _

            Grant,

             

            Thankyou for responding to my message.  Yes Field1 is the only key in the source data, and there are a total of ten more fields.  Each field is a string value with 15 characters max.  The only releationship the 10 fields have is with Field1

             

            I have Monarch V.8 if that helps.

             

            Mark

             

            Originally posted by Grant Perkins:

              /size[quote]quote:[/size]this is similar to the structure I would like to work with:

             

            [font="courier"]     Field1     Field2     Field3     Field4     Idx

                 AA     abc

                 AA          def

                 BB          456       

                 BB     123

                    BB               789

             

            New Table/Array/Container would be

             

                 Field1     Field2     Field3     Field4     Idx

                 AA     abc     def

                 BB     123     456     789[/font][/quote]I hope this makes sense. 

             

            Mark /b[/quote]Mark,

             

            Acception that field 1 is the key for the summary it looks like the other fields have no relationship to each other other than through Field 1. Is that the case?

             

            If so, how many values might there be for Fierlds 2 and onwards in the array and what purpose are you seeking to satisfy with this format?

             

            For the sample could imagine looking to do something with the Multi Column Region functionality (assuming you have Monarch V7 or higher?) and then the Summary functionality. However unless the entire report is about as simply as you have outlined I doubt it would be a practical solution.

             

            I may have missed something?

             

            Grant /QB[/size][/QUOTE]

            • Creating Arrays from Mutliple Records
              Grant Perkins

              Mark,

               

              I'll try to write this without making up words that are not found in any dictionary this time!

               

              Is it important to know which field the data comes from? What you have written sort of suggest it is not or that for every key there can be no more than one value in a subsequent field column. However, if the value in the column header is of significance we need to take that into account.

               

              Grant