setObsAttr (wbk, obsTable, callback);
wbk. Sets workbook value.
obsTable. Sets the table that contains observation attribute values.
callback. Sets handler for operation execution end.
The setObsAttr method is used to set observation attributes.
To execute the example, create a service for working with time series (see «TSService.getSetSortSettings». Observation attributes must be defined for a time series database used as a workbook source.
NOTE. Observation attributes are configures in desktop application in the time series database creation wizard.
The following code must be added in the document opening event handler:
//Use for setting observations attributes var wbk = args.Workbook; var obsTable = wbk.getSelectedObsTable(); tsService.setObsAttr(wbk, obsTable, PP.Delegate(onSetObsAttr, this)); //setObsAttr method execution end event handler function onSetObsAttr(sender, args){ console.log(sender); console.log(args); }
After executing the example observation attributes are set.
See also: