5 Replies Latest reply on Jan 23, 2017 2:24 PM by philmodjunk

    Different charts, same layout


      Hi all.


      I can't find a way to have different charts (with their different sorts) in the same layout (dashboard style) and have them all displaying correctly at the same time. I can attach a script directly to each graph and cycle trough them by clicking each one, but that's not what I wanted...

      I did find a tutorial on youtube about making a dashboard, but It seemed very difficult to implement (for me). Is the hard way the only way or there's something I'm not seeing?



        • 1. Re: Different charts, same layout


          Charting in any platform involves getting the data from the tables, formatting the data for the platform's chart, and then making the data available to the chart..

          In FileMaker there are many ways to get data: You can use relationships, ExecuteSQL, HyperList. You can store the data in global variables or in global fields.


          So your first task is to take a walk through your system and collect the data. Once it has been collected, you place each kind of data (for each chart) into global variables or fields and have each chart display each field/variable of data.


          I think I know of that tutorial; in this day and age, it is a bit complex; I think it uses relationships, which are fine, but there are other means for gathering the data.


          Your script, to update each chart, would involve going to each table and finding the correct records to display and then formatting them correctly.


          As you may know, FileMaker charts can show data from a current record as delimited data, a found set, or from related records or a list.


          Here's how I'd set this up:

          1. A table called Dashboard that contains one field for each chart's x and y axis (two fields per chart)

          2. A script that goes to each table from which data is gathered, finds the records, and then plops the values (x and y values) into the appropriate fields.

          3. Each chart is set to "Current record (delimited data)" and displays the values from those appropriate fields.


          That's a start. Feel free to ask any specific questions.

          • 2. Re: Different charts, same layout

            Thanks man...I'll digest this...slowly...


            Lot's to learn...

            • 3. Re: Different charts, same layout

              Attached is a demo file.

              As it explains, I simply typed in the data here. The file does show how it is possible to do many charts per layout that show different data.


              You'd use some scripting to fill in these fields appropriately.


              Ways to gather data:




              Good ol' find and loop through records.


              They are useful for this kind of work as well as everything else we developers do.

              1 of 1 people found this helpful
              • 4. Re: Different charts, same layout

                Many thanks, I'll study it carefully!

                • 5. Re: Different charts, same layout

                  There are also other options.


                  ExecuteSQL can pull the data together as delimited data. You can define a different pair of such queries for each chart.


                  You can set up the actual chart object on a different layout--this can be especially useful for charting summarized data. A script can switch to that layout, perform a find, sort the records and then use Set field and GetLayoutObjectAttribute to get the image of that chart entered into a global container field that you then place on your dashboard.


                  And it's quite possible, for many charts, to use the related records option and simply set up a different relationship for each chart using additional table occurrences as needed. You can even manipulate match fields in the dashboard table to control what related records become part of that chart. (This option does not work for charts of summarized data.)