This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Takes and array of arrays matrix and return an array of elements. | |
function flatten(arrayOfArrays){ | |
return [].concat.apply([], arrayOfArrays); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// I took one of Knack's examples and tweaked it a bit to duplicate my own records since I needed this ASAP. | |
// This example works off of a record's detail view to access the data. I have not worked up a table solution yet. | |
// TODO: - Add connected records | |
// Change your view | |
$(document).on('knack-view-render.view_12', function (event, view, data) { | |
// Map new record fields with current record in view | |
var duplicateData = { | |
// If field is connection, we need to match the ID in order for Knack to pick it up | |
field_57: data.field_57_raw[0].id, |