Hi @david.glickman,
I think the best way to approach saving user data is to use the writeback that is built into the application (Data Input). You can create a data cube that will hold all of your data and have a column that stores something identifying about the user. The benefit here is that a data cube goes through the data model and can be easily visualized any way you need.
I’ve taken this writeback idea as far as building a full user based bookmark system in Dundas BI. In the visualization below, we are listing all dashboards in a folder and the user can click on the favourite cell to add a star and move the dashboard to the top. What is happening behind the scene is that we are writing back to a data cube using data input to store dashboards that are currently favourited.
Here’s my code:
var args = dundas.Utility.getAdapterHitTestArguments(e.originalEvent, table1);
var hitTestResult = table1.control.hitTest(args.offsetX, args.offsetY, args.target);
var rowIndex = hitTestResult.rowIndex;
var colIndex = hitTestResult.colIndex;
// check if the favourite is already set
if (table1.metricSetBindings[0].dataResult.cellset._rows[rowIndex].members[0].caption != "True") {
var dashboardId = table1.metricSetBindings[0].dataResult.cellset.rows[rowIndex].members[4].caption;
var inputService = dundas.context.getService("DataInputService");
var def = inputService.insertDataStorageRecord("28c4db73-6b38-46f2-8ada-283063d5a50e", "abac74f0-8b37-4a87-aefd-693409d1709b", [dashboardId.toString(), true]);
def.done(function (message) {
// after writeback, reload the table
table1.loadData();
});
} else {
var recordId = table1.metricSetBindings[0].dataResult.cellset.rows[rowIndex].members[5].caption;
var inputService = dundas.context.getService("DataInputService");
var def = inputService.deleteDataStorageRecord("28c4db73-6b38-46f2-8ada-283063d5a50e", "abac74f0-8b37-4a87-aefd-693409d1709b", recordId);
def.done(function (message) {
table1.loadData();
});
}
As you can see this would have all the elements that you need when it comes to writing and getting user data without editing any user information with the added benefit of being able to visualize the results.
I did a video covering the concept of writeback if that helps too.
https://www.dundas.com/resources/off-the-charts-tips-from-an-expert/adding-writeback-capabilities-dashboard