In a table view, how do you create a scene link that is not a link to delete, edit, view more details, or a link to another page? See screenshot how a similar link has been created.
In a table view, how do you create a scene link that is not a link to delete, edit, view more details, or a link to another page? See screenshot how a similar link has been created.
You can create your own dynamic links with text formulas if you are recording the record ID's of the record or parent record etc. See developer Docs.
You may want to store your records' internal, unique Knack IDs in a field to reference outside of your code. For this example, you will need the following:
// Listen for a record being created on view_1 $(document).on('knack-record-create.view_1', function(event, view, record) { // Set up PUT request to update the record // Note that we use the URL for a separate edit form which has an input for the ID field var url = 'https://api.knack.com/v1/pages/scene_2/views/view_3/records/' + record.id; var headers = { 'X-Knack-Application-ID': Knack.application_id, 'X-Knack-REST-API-Key': 'knack', 'content-type': 'application/json' }; // Set our short text field's value to the newly created record's Knack ID var data = { field_2: record.id }
Once you have record ID’s you can parse the url to reach a destination not offered as a default.Knack.showSpinner();
// Make the AJAX call
$.ajax({
url: url,
type: ‘PUT’,
headers: headers,
data: JSON.stringify(data),
}).done(function(responseData) {
console.log(‘Record updated!’);
Knack.hideSpinner();
});
});