Hi all,
I am trying to use Javascript for filtering out data. When I run the protocol, I can filter out the data with the suitable name in the text box. However, if I delete the entry in the text box it is not showing the full data. Request your help with the commands to do this. The protocol use data connector (myDataConnectorId) and data is connected to JSON (dataStore).
/* TEXT FILTER FUNTION */
function textfilterfunction() {
var selection = new Array();
var box = document.getElementById("textbox");
var b = box.value;
for (r in dataStore) {
if (dataStore[r]["Division"] == b ) {
selection.push(dataStore[r][Pilot.Report.DataConnectorUtils.RECORD_ID]);
} else {
Pilot.Report.DataConnectorUtils.clearSelection('myDataConnectorId');
}
}
Pilot.Report.DataConnectorUtils.publish('myDataConnectorId', 'apiPublisher', selection, null, null);
}
Additionally, how to use filtering with each entry in the text box. For eg.. the data starts filtering with H itself rather than HC.
Furthermore, could you guide me on where to find reference on the usage and details for commands like. Pilot.Report.DataConnectorUtils.clearSelection('myDataConnectorId'), Pilot.Report.DataConnectorUtils.publish('myDataConnectorId', 'apiPublisher', selection, null, null); etc
Thanks and Regards
Tinto
