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

Want to get my auto-refresh rate from an external source.

Level 1

Want to get my auto-refresh rate from an external source.

I am having an app from where we are getting an integer value which is thingworx refresh rate. I want to bind the auto refresh rate in thingworx with this value. I have already created a service in which i am getting this value from the app and have binded it with autorefresh but after that also my page is getting refreshed according to the refreshinterval present there.

Thanks

9 REPLIES 9

Re: Want to get my auto-refresh rate from an external source.

Anupriya Agarwal​, To which property are you binding the integer value in Auto Refresh widget? RefreshInterval is not a Bindable property.

Re: Want to get my auto-refresh rate from an external source.

Ankit Gupta​, I am binding that value to autorefresh but it is taking the value which is mentioned in RefreshInterval.

Re: Want to get my auto-refresh rate from an external source.

Anupriya Agarwal​ AutoRefresh is a binary property which switch on/off automatic refresh. RefreshInterval is not Bindable currently. Checked in ThingWorx 7.2.3

This is what you would require to bind and change.

So, you need to create your own custom widget for that. You may use the existing AutoRefresh widget as base for your extension.

Hope it helps.

Re: Want to get my auto-refresh rate from an external source.

Anupriya Agarwal​, Ankit Gupta​,

Note that according to support article 253341 and to R&D ticket PSPT-2703 the improvement request to make the RefreshInterval property (of AutoRefresh widget) bindable is already added to ThingWorx 7.4 backlog which is currently targeted for March release. This does NOT guarantee a release, as priorities may change.


Hope that the information is useful,

Horia.

Re: Want to get my auto-refresh rate from an external source.

Hi,

Can you provide the links of the Support article?
I did'nt find the article you talk about.

Regards

Re: Want to get my auto-refresh rate from an external source.

I confirm that enhancement has not been done for the 7.4 ThingWorx version.

Re: Want to get my auto-refresh rate from an external source.

Hi,
Were you able to achieve this behaviour?.We too have a same requirement but could not bind the autorefresh interval to a value from service.

Kindly provide your inputs.

Thanks
Kavitha

Re: Want to get my auto-refresh rate from an external source.

As pointed out on previous answers, Autorefresh widget isn't suitable as the property RefreshInterval isn't bindable, you should build your own.

 

Wait one moment, I'm just thinking loud..., you can build a not super efficient with three widgets:

  1. Refresh (let's set it to trigger every 1 second)
  2. Expression widget with a value (NUMBER) parameter and this expression: (value==null?0:value+1), refresh widget should trigger this expression, and this expression widget output should be bound to itself (value parameter)
  3. Validator widget which get's as input the triggering interval (triggerFrequency) in seconds and the current second value (current) which it's the output of the previous expression widget.

I've tested it and it works, i've attached a sample.

 

But as said before, better to build your custom Autorefresh bindable ( the easiest way should be to copy the AutoRefresh widget code which it's on the server and just make the desired property bindable ).

 

 

Re: Want to get my auto-refresh rate from an external source.

Hi,

 

Thanks its working.

 

But the autofresh happens after 30 seconds once my mashup is closed.

 

Is it take the default value from autorefresh widget?

 

Thanks for the support