Hello,
I’m building a series of dashboards to replace an Access database currently being used in our organization.
I have a dashboard that will display patient data in a sort of form view, for lack of a better term.
Instead of using many data labels, I’d like to retrieve values from each of the columns of the filtered metric set, which will only have one patient’s data (one row only).
Users navigate to a specific patient’s record (this dashboard) by clicking on that patient’s record on another dashboard from a list of patients.
I can retrieve the values right now by using the script below, but from the metric set unfiltered, all rows, all patients.
Here is a portion of my script:
var baseViewService = this.getService(“BaseViewService”);
//metric set
var metricSetId = “d1ddb307-3b43-477d-9580-8da8fa231df2”;
var dataRetrievalService = this.getService(“DataRetrievalService”);
var viewService = this.getService(“ViewService”);
var request = new dundas.data.Request({
“objectId”: metricSetId,
“requestData”: dundas.Utility.createGuid(),
});
var def = dataRetrievalService.getData(request);
viewService.showLoadingRestCall(def);//Assign a value to currentCINLabel
def.done(function (dataResults) {
var cinMember = dataResults[0].cellset.rows[0].members[1].loadMemberValue();
var cinValue = cinMember.uniqueName;
var cinIndex = cinValue.indexOf(".");
currentCINLabel.labelText = cinValue.substring(0, cinIndex);
});
This will retrieve those values / captions from the first row of the metric set, but does not necessarily match the actual row of data the metric set has been filtered to.
Any help with this will be much appreciated!
Thanks,
Jim