Automatically Connect to a different table after form submission

All,

 

This should be really simple but I'm not finding it in a search.

 

I've got two forms that can be filled out. A first, and a follow up. In the follow up, they fill out their e-mail, and they click an opt-in button. I'd like this to then search for that e-mail in the original table, and if it is found, update the record to include they opted in.

 

How can you do this?

Hello Chase,

$(document).on('knack-form-submit.view_363', function (event, view, record) {
//var orderNum;
var GetRecords = 'Urlwith Whare conditions';
$.ajax({
url: GetRecords ,
type: "GET",
headers: { 'X-Knack-Application-Id': API_ID, 'X-Knack-REST-API-Key': API_Key },
success: function (data) {
var RecordId =data.records[0].id
// Updater record based upon above id "RecordId "
}
//} //end success function(data)
});
//alert('Order Submitted Successfully!\n Your order number is: '+ orderNum);
}); //document.on view363 (line 1)

 

Thanks,

Sunny Singla

ssingla1985@gmail.com

+919855089359

Hey Sunny,

 

I do generally have a programming background, but haven't used any with Knack. Can you provide some clarity on what is needed? I can put this piece of code where, to be able to capture the email on submit?

 

Then where can I lookup the specific ways to query another table and fill them out in Knack so I can fill out the rest of the function?

Hi Chase,

You can try using this.

 

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

var email =record.fieldId.email ;

// Search records based upon this email from another object and update it's status . 

});

 

Thanks,

Sunny Singla

ssingla1985@gmail.com

+919855089359