I’m using datatables and trying to add an id to an array in app connect on selection of a row. This is the function:
function dt_select(rowid, checkboxid) {
// console.log(checkboxid);
// Get the checkbox
var checkBox = document.getElementById(checkboxid);
console.log(rowid);
var testingvar = 'testingvar';
// console.log(checkBox);
// // If the checkbox is checked, add to array
if (checkBox.checked == true) {
console.log('checked');
dmx.parse('content.arrBulk.addUniq(`' + rowid + '`)');
dmx.parse('content.varTest.setValue(`' + rowid.toString() + '`)');
console.log(dmx.parse('`' + rowid + '`'));
} else {
console.log('unchecked');
dmx.parse('content.arrBulk.remove(`' + rowid + '`)')
}
}
Broadly it all works fine, the id gets added to the array. The only thing is the dmx.parse step adds {{…}} to the id which I don’t want.
So, a couple of questions:
-
Is this expected behaviour? (I’ve used dmx.parse previously in different ways and not noticed any thing similar, though different context may have made it irrelevant)
-
Is there anything I can change to make only the id add to the array?
Initially I worked around in server connect to strip the brackets but it really would be useful for them to not be there!
I’d be grateful for any thoughts!
Community Page
Last updated:
Last updated: