3 Replies Latest reply on May 23, 2014 5:58 AM by MorkAfur

    Execute SQL Charting Issue

    MorkAfur

      Title

      Execute SQL Charting Issue

      Post


           Starting a new topic since the old one is probably confusing at this point.

           I'm gathering no one wants to download a FMP12 file and try to run it so I've made a comprehensive screen shot of what's happening.

           Basically there are 10 "x" values (Field Value1) and 10 "y" values (field Value2).

           Using an ExecuteSQL in the data viewer shows all the y values as expected, YET, when using the same ExecuteSQL in the chart, I see all the same value. I've tried having the "p" in the ExecuteSQL and the "". Tried using the option, as PMJ suggested, for "delmited data" etc.

           Nothing works.

           This example is about as simple as I can think of that duplicates the actual issue I'm having.

           No need to "sort" or "group" since I just have 10 x values and 10 y values I want to chart.

           Hopefully someone can see what's wrong -- see screenshot below.

           The example shown in the screenshot below uses an "Order by" clause, but it doesn't make any difference. Also, there were two "10" Value1s. I removed the second one from the data, but didn't completely update the graphic below. In any case, it didn't make any difference to remove the second 10 from the Value1 set of values.

           Thanks in advance.

      ExecuteSQL-ChartIssue.png

        • 1. Re: Execute SQL Charting Issue
          MorkAfur

               I had this happen in FMP 12 also so clearly either there's a bug (unlikely) or I'm doing something wrong here.

               In the data viewer, the ExecuteSQL referenced in the screenshot above (ExecuteSQL ( "Select Value2 as Value2 from SampleExecuteSQLChart ORDER BY VALUE2"; ¶; ¶)), returns this set of numbers below:

               1
               4
               5
               5
               12
               13
               14
               15
               21
               22

               ----

               So, why is the chart showing all the same value?

               Any suggestions would be welcome.

               Thanks,

               -m

          • 2. Re: Execute SQL Charting Issue
            philmodjunk

                 If you are going to use Delimited Data, you need to specify a list of values for both X and Y data series.

            • 3. Re: Execute SQL Charting Issue
              MorkAfur

                   Yes, that works.

                   Appreciate your follow up on this. :)

                   -m