2 Replies Latest reply on Oct 4, 2016 12:50 PM by pchung RSS
    dbryant Newbie

    How to get data from a MS SQL SP to drive a Gauge Widget

    I have a sql Database connection with services. How do I get a Gauge Widget driven by data returned from a stored procedure? Does it need to have an output parameter assigned to the Gauge?

     

    Any advice appreciated,

      • Re: How to get data from a MS SQL SP to drive a Gauge Widget
        ttielebein Collaborator

        David,

         

        I'd recommend wrapping the stored procedure call in a Javascript service written on some helper thing in your application, and then bind this to your gauge widget. The service can receive the output from the database and output it in whatever format is needed for your mashup.

         

        Hope this helps!

        Tori

        • Re: How to get data from a MS SQL SP to drive a Gauge Widget
          pchung Collaborator

          The Gauge widget accepts a BaseType Number for Data.

          Your data from the SQL procedure will come back as an InfoTable.

          As Tori said, either in your wrapped service you can output the required field/column as Number or just output the whole table (infotable) and grab the specific field to bind to the Gauge widget.

          Besides that you will likely need a refresh widget to pull the value periodically (although in 7.2 it can be pushed)