cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

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

How to get output from a data filter widget

Janicen
16-Pearl

How to get output from a data filter widget

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. 

filter.png

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.

ACCEPTED SOLUTION

Accepted Solutions

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

nmutter_0-1663701334981.png

 

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.

 

View solution in original post

In this video, you'll learn how to use the Chip Based Data Filter widget to filter data within a grid.
2 REPLIES 2

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

nmutter_0-1663701334981.png

 

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.

 

In this video, you'll learn how to use the Chip Based Data Filter widget to filter data within a grid.

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.

Announcements


Top Tags