How to use dropdown selection as input to get sql script output
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
How to use dropdown selection as input to get sql script output
I want to use dropdown selection as input to get sql script output.
1) I create a service using sql, the input is a string
in SQL script, like this:
2) In the mashup, there is a piechart to show the sql script result:
3) The service is created successfully. The parameters are show in the service
4) The dropdown menu service is like this, the 'name' is the input to the pie chart sql script
I tried to drag the 'All Data' -> 'Name' or 'Selected Rows'->'Name' to match the input parameters 'BuildingName'. To get the pie chart input data. But failed.
How can I manage to do this? Thank you!
Solved! Go to Solution.
- Labels:
-
Troubleshooting
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Issue Resolved. SelectedRowsChanged event of the Service feeding dropdown list widget was not bound to the Script Service feeding Pie-Chart.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
I'm not sure I quite understand your use case. You want to use an item from the drop-down list to serve as an input for your pie chart? You may try binding selected rows/Name to the Bindingbuilding parameter in your chart service.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi Polina,
Yes. You are right. I have binded the selected rows/Name to the Bindingbuilding parameter in the chart service. But not successful...
I don't know why...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Issue Resolved. SelectedRowsChanged event of the Service feeding dropdown list widget was not bound to the Script Service feeding Pie-Chart.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Thank you!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi Tiantian Guo,
Does this service work fine on testing from Composer?
Also, did you bind the selected value changed of the Service with the Sql Service to call it when the value changes?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
is the "Name" is input to the Pie chart? it seems String if thats the case and i am right then you will need to provide a infotable as a input to PieChart which contains The mainly 2 rows "Name" and respective % of that Name.
Go Through https://community.thingworx.com/message/49060#49060
