Dynamic View update

I have a view that displays a table based on the data source. is it possible to automatically update the view when the data source's data is updated?

The data is updated via an external API call to knack.

i ended up with

$(document).on('knack-form-submit.view_xxxx', function (event, view, record) {

$.ajax({ type: "POST",

url: "xxxx",

data: JSON.stringify({xxxx}),

contentType: "application/json"

});

var startIntervalDate = new Date();

var interval = setInterval(function(){

Knack.views.view_xxxxx.model.fetch();

var duration = new Date().getTime() - startIntervalDate.getTime();

if( duration >= 900000 ) {//15 min

clearInterval(interval);

}

}, 1000);

});

the reason with the interval is that the api call will constantly update the data in knack so i'll keep calling fetch for 15min or until the user moves to another scene.

Hi Kim,

I think this possibly might help however this event listners for a form.

knack-record-create.yourview'

knack-cell-update.yourview

$(document).on('knack-record-update.view_yourview', function(event, view, record) {
Knack.views['view_153'].model.fetch();
});

If this doesn't work just ping me a email jonathan.mart.parsons@gmail.com

thanks, i'll try the solution in one of the links.

Hi Kim - we don't currently have any built-in features to do this, but there are a couple of threads here in the forum where other users discuss refresh options. It doesn't look like any match your exact question, but if you don't get a response here on how other users have approached this workflow requirement, reach out on one of the other threads if you have specific questions on their approach.

Thanks!