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 filter data from stream based on some condition and store in a property?

akesana
1-Newbie

How to filter data from stream based on some condition and store in a property?

Hi,

We created one stream which logs all the things data at run time, we would like to retrieve one of the record value and bind that value to graph based on some condition.

Another scenario is we have a dropdown widget we want to bind only distinct values to it though we have duplicates in our stream column which we bind to it.

Could anyone help us to achieve these two functionalities.

Regards,

Anil Kesana

3 REPLIES 3
posipova
20-Turquoise
(To:akesana)

Through a mashup, you may use data filter widget to query your stream data . But best way would be to write a javascript service to query your data based on some parameters and then you can bind it accordingly in your mashup.

Similarly, with the dropdown list. You may bind data that was already filtered through your service.

Hi Polina,

Could you send js custom service code sample which filters stream based on input we pass to it. It would be help full if you send steps to create service and filter the stream.

We have tried but could not get it please help to achieve this

Regards,

Anil Kesana

posipova
20-Turquoise
(To:akesana)

You may use services functions to create a new service, specify your input and outputs. For example, you may use a snippet for querying properties, and your input would be a json string for the query base type:

Top Tags