Hi Richard,
In my sample, I used an API to update the notes being added to a user. To do this, you need to make sure that the recordId has been added to the input table and the recordId needs to be available in the visualization so that we know what they clicked.
See how i am adding the recordId to the first label? It’s part of the data set, but i’m not displaying it in the text to the user. I do this by removing it from the text binding in the visualization button.
In the code: i reference the Id.
var recordId = dataLabel1.metricSetBindings[0].dataResult.cellset.rows[0].members[2].caption;
var customerId = dataLabel1.metricSetBindings[0].dataResult.cellset.rows[0].members[0].caption;
var selectedAction = ‘’;
for (i=0;i<dropDownList1.items.length;i++)
{
if (dropDownList1.items[i].isSelected)
{
selectedAction = dropDownList1.items[i]._caption;
}
}
var inputService = dundas.context.getService(“DataInputService”);
var del = inputService.deleteDataStorageRecord(“041163cf-c162-49df-b4e6-89293897f2d7”, “9049c9ed-6f1c-4d50-b664-6b919ecba836”, recordId);
del.done(function (message) {
var def = inputService.insertDataStorageRecord(“041163cf-c162-49df-b4e6-89293897f2d7”, “9049c9ed-6f1c-4d50-b664-6b919ecba836”, [selectedAction, customerId]);
def.done(function (message) {
// reload the scorecard
this.parentView.reset();
}.bind(this));
}.bind(this));
Please let me know if you need any more information.