Community Tip - You can subscribe to a forum, label or individual post and receive email notifications when someone posts a new topic or reply. Learn more! X
Hello, community,
I am trying to filter my stream using the data filter widget. I wrote a service that outputs values from my stream. I've bound all data from the stream to the data filter widget. Took the query property of the widget and bound it to the grid. Then took the querychanged event from the widget to invoke my customer service.
On runtime, I can query using my filter but the result (filtered data) does not appear on my grid. It only shows the number of rows that have been filtered. Please see the screenshot below.
How can I solve this? I used this tutorial: https://support.ptc.com/help/thingworx/platform/r9/en/index.html#page/ThingWorx/Help/Mashup_Builder/Widgets/ChipBasedDataFilterWidgetThemable.html
Many thanks.
Solved! Go to Solution.
The service "which outputs values from your stream" needs to accept a query parameter, which it will use when querying the stream data.
See in your video at https://youtu.be/LHmXjLBsrsE?t=69
The query is passed to the grid, and the grid passes it to the QueryDataTable service. So the service which you are using to currently get all data needs to apply the query and return only the matching entries.
So the filtering is done in the Backend, needing a new service call each time the user changes its query.
The service "which outputs values from your stream" needs to accept a query parameter, which it will use when querying the stream data.
See in your video at https://youtu.be/LHmXjLBsrsE?t=69
The query is passed to the grid, and the grid passes it to the QueryDataTable service. So the service which you are using to currently get all data needs to apply the query and return only the matching entries.
So the filtering is done in the Backend, needing a new service call each time the user changes its query.
thank you @nmutter. This worked
I created a custom service that queries my stream and returns the desired columns. What was missing was adding an input of type query and passing this input to the query parameter of queryStreamEntrieswithData.