4 Replies Latest reply: May 15, 2014 10:14 AM by elginreigner _ RSS

    Field Names

    kmilton _

      Trying to create field names for columns in a table, where the field names are extrapolated from the source report. As an example, I work with a number of columnar reports which have many date range fields. These fields names will change on the source report depending on when the source report is generated, or what date range is selected in the source report. If I name the fields, each time I use the model, I have to go back to re-name the fields, since date fields have now changed.

      Would like to just capture the names from the source report, each time model template is applied.

        • Field Names
          KeyserSoze _

          You've chosen a somewhat challenging topic for your first post kmilton. Welcome to the forum.

           

          While this type of functionality isn't built-into Monarch per se, based on other posts in this forum it can be done.

           

          See this [URL="http://www.monarchforums.com/showthread.php?1541-Capturing-Period-Titles"]exchange between Data Kruncher and Grant Perkins[/URL] which detailed a similar need and apparently a working solution. I believe that thread made reference to [URL="http://www.monarchforums.com/showthread.php?1605-Field-Names"]this discussion[/URL], though the original link doesn't click through properly due to past Monarch forum server changes.

           

          Try these ideas and let us know of your progress and if you require further assistance.

            • Field Names
              Olly Bond

              Hello kmilton,

               

              Essentially, you want to use the dynamic values that will be field names as the Across key in a Summary.

               

              Export that to CSV, re-import to Monarch saying "treat the first row as field names", and the job's done.

               

              If your field names are the values of more than one field, you might need some trickery or more than one model to get the data into shape.

               

              If you can post a sample, we'll happily walk you through the process.

               

              Best wishes,

               

              Olly

                • Field Names
                  Grant Perkins

                  As has already been mentioned there are a few possibilities for adapting the incoming data format(s) to manufacture a revised output structure - which I assume is the result you need to deliver here.

                   

                  To that end knowing the starting input and the final output structure you have in mind would be of great help. There are plenty of possible approaches but it's always nice to be able to target the most effective approach for the challenge first and discuss the alternative options later if they might be of interest.

                   

                  As a general guide to a typical columnar report with variable column 'name' headers it's usually good to think of the columns as 'Column 1', 'Column 2' etc. The 'Name' in the header is not a name, it's a common field shared from part of the data records. So the first step is to to reduce th records to their unformatted form (i.e. remove the columnar structure and create a table).

                   

                  The next step or steps will recreate (one assumes) the columnar structure of the data in a revised format. (Typically this might be a 12 month report form a series of quarterly reports for example ... but could be something more complex and with additional analysis compared to the original report.). Grouped Columnar output from Monarch is mostly result of creating appropriate Monarch Summaries from suitable data in the table. The data records may then include some calculated fields that help with the re-structuring.

                   

                  So knowing the final output structure intended can be rather influential for the approach to be taken.

                   

                  Of course you may already know all of this  - but if not it may just allow you to see the problem from a slightly different angle.

                   

                  HTH.

                   

                   

                  Grant

                  • Field Names
                    elginreigner _

                    Hello kmilton,

                     

                    Essentially, you want to use the dynamic values that will be field names as the Across key in a Summary.

                     

                    Export that to CSV, re-import to Monarch saying "treat the first row as field names", and the job's done.

                     

                    If your field names are the values of more than one field, you might need some trickery or more than one model to get the data into shape.

                     

                    If you can post a sample, we'll happily walk you through the process.

                     

                    Best wishes,

                     

                    Olly[/QUOTE]

                     

                    +1 I like this. It's a simple solution for what can be complex.