Since version 2.1, support for additional datasets is added in the Business Analyst Online tasks. In addition to existing U.S-specific data and content covering previous years, all of the existing API services can now be used to access and leverage additional datasets including a new U.S. Census 2010 dataset and a new Canadian dataset. Read more.
To execute a task on another dataset such as the Canadian dataset, you can specify:
var parameters:SimpleRingsParameters = new SimpleRingsParameters(); // ... var task:SimpleRingsTask = new SimpleRingsTask(client); task.activeDatasetID = "Canada"; task.execute(parameters, new Responder(SampleCallback.result, SampleCallback.fault));
var parameters:SimpleRingsParameters = new SimpleRingsParameters(); parameters.activeDatasetID = "Canada"; // ... var task:SimpleRingsTask = new SimpleRingsTask(client); task.execute(parameters, new Responder(SampleCallback.result, SampleCallback.fault));
The activeDatasetID property of a parameters class instance has precedence before the property of a task instance. So, if the activeDatasetID property is specified for both task and parameters class instances, the value set on the parameters class will be taken into account. In the example below, the task will be executed for the Canadian dataset.
var parameters:SimpleRingsParameters = new SimpleRingsParameters(); parameters.activeDatasetID = "Canada"; // ... var task:SimpleRingsTask = new SimpleRingsTask(client); task.activeDatasetID = "USA"; task.execute(parameters, new Responder(SampleCallback.result, SampleCallback.fault));
You can also specify the activeDatasetID property for parameters of a simple task as follows:
var parameters:IBATaskParameters = GetReportTemplatesTask.createParameters(); IBADatasetParameters(parameters).activeDatasetID = "Canada"; var task:BAOnlineGenericTask = new BAOnlineGenericTask(client); task.execute(new Responder(SampleCallback.result, SampleCallback.fault));
The list of available datasets could be retrieved with the com.esri.bao.tasks.utilities.GetDatasetsTask task which was added in 2.1.