Community Tip - New to the community? Learn how to post a question and get help from PTC and industry experts! X
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,
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
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)