Hi
I hope someone can help me out here. I’m sure it’s something simple but can’t for the life of me work out what is wrong…
I’m making a basic view based get request as follows:
$(document).on(‘knack-form-submit.view_1011’, function(event, view, record) {
$.ajax({
url: ‘https://api.knack.com/v1/pages/scene_345/views/view_2474/records/’,
//async: false,
type: ‘GET’,
headers: {
‘Authorization’: Knack.getUserToken(),
‘X-Knack-Application-Id’:Knack.application_id,
‘X-Knack-REST-API-KEY’:“knack”,
‘Content-Type’:‘application/json’
},
complete: function(data) {
Knack.views['view_2474'].model.fetch();
Knack.views['view_2475'].model.fetch();
},
success: function(data) {
console.log (data);
.
.
. etc
View_1011 and view_2474 both reside on scene_345. View_1011 is a form and view_2474 is a table view.
I’m tryng to retireve all of the records from view_2474 after view_1011 has been submitted. I can see that there are records in view_2474 with my own eyes but the above code refuses to return any records at all. The GET executes successfully but returns 0 records.
Any ideas??? This is driving me nuts.
Many thanks, Neil.