Community Tip - Did you get an answer that solved your problem? Please mark it as an Accepted Solution so others with the same problem can find the answer easily. X
Dear Team,
I need to enable Automatic update when values available in custom service. So how can I achieve this functionality?
Can you explain this a little better please?
What does your model look like, what is your service, what needs to be updated?
Hi,
I need to auto update my time series chart. For this I am using Auto refresh widget. But I don't want to sue this AutoRefresh widget. Such refresh option are available in GetProperties [Automatic update when values available] without using AutoRefresh widget.
In order to render data on my time series following code has written. So How can I add [Automatic update when values available] features in mu custom service in order to avoid AutoRefresh widget?
My service code:
var query2 = {
"filters": {
"fieldName": "source",
"type": "EQ",
"value": filter
}
};
var params = {
oldestFirst: undefined /* BOOLEAN */,
maxItems: undefined /* NUMBER */,
sourceTags: undefined /* TAGS */,
endDate: undefined /* DATETIME */,
query: query2 /* QUERY */,
source: undefined/* STRING */,
startDate: undefined /* DATETIME */,
tags: undefined /* TAGS */
};
// result: INFOTABLE
var result = Things["PumpValueStream"].QueryStreamEntriesWithData(params);
Data binding on mashups
Automatically update values when able is currently available only for GetProperties service.
As a workaround; you can try to call your custom Service on ServiceInvokeCompleted of GetProperties service.
I hope it helps.
Thanks. But this workaround not working.
Hi Bhuwaneshwar Gupta,
Please do following:
1. Find all the Properties in your Thing for which the DataChange should trigger the custom service.
2. In mashup; add value display widget (or some other widgets) for each property in Step1.
3. Bind the properties from GetProperties service to these widget.
4. Set visible property of these widgets to false so that they don't show up at the RunTime.
5. Now bind the ServiceInvokeCompleted of GetProperties Service to your custom Service.
6. Save and view Mashup.
Result: When any of the Property from Step1 is changed; Custom Service will be called.
Thanks. Working