Table column scene link

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.

Store records' Knack IDs in a field

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:

  1. An object with a short text field to be used to store each record's ID (example below: field_2)
  2. A form to add records for that object (example below: view_1)
  3. A page with a form to edit records for that object (example below: scene_2/view_3). This form must contain an input for the short text field you use to store the ID.
// 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 }

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();
});
});

Once you have record ID’s you can parse the url to reach a destination not offered as a default.