isDeterministicSerie (serie);
serie. Sets series index.
The isDeterministicSerie method determines whether specified series is calculated using the Deterministic formula.
This method returns True if formula type of the series passed to the method as a parameter, is Deterministic, otherwise the method returns False.
To execute the example, the page must contain the WorkbookBox component named workbookBox (see and the following code must be added in the document opening event handler), the first series must be a calculated one, and the following code must be added in the document opening event handler:
var getIsDeterministicSerieButt = new PP.Ui.Button({ ParentNode: document.body, //DOM parent node Content: "Get Series Type", //Text Click: PP.Delegate(onClickType) }); function onClickType() { var series = wbk.getSeries(); var messageString = ""; for (var i = 0; i<series.length; i++) { //Determine whether the specified series is calculated by the Deterministic formula. PP.TS.isDeterministicSerie(series[i]) ? addDeterministicSerieString(i) : addNonDeterministicSerieString(i); } function addDeterministicSerieString(rowIndex) { messageString = messageString + "The series number " + i + " - has the Deterministic formula type." + '\n'; } function addNonDeterministicSerieString(rowIndex) { messageString = messageString + "The series number " + i + " - has the formula type that differs from the Deterministic type." + '\n'; } alert(messageString); }
After executing the example the button named Get Series Type is placed in HTML page. Clicking this button shows a message on whether the series available in the table are calculated using the Deterministic formula.
See also: