CreateAnalyticInstance
Mon 01 January 2018Syntax
CreateAnalyticInstance(AnalyticType, ID, Descr, &RecordRef, ForceDelete)
Description
Use the CreateAnalyticInstance function to create an analytic instance as identified by the analytic ID . If ID is an empty string, the system automatically generates a unique ID.
This function only creates the metadata for the ID. It doesn't load the instance into an analytic server.
If this analytic instance already exists in the system, and you specify ForceDelete as false, the analytic instance is not created. If you specify ForceDelete as true, the existing analytic instance is deleted and the new one is created.
Every analytic type definition is defined with an application package that contains three methods: Create, Delete, and Copy. The values in &RecordRef are passed to the Create method.
Parameters
Field or Control |
Definition |
---|---|
AnalyticType |
Specify the name of the analytic type definition to be used. |
ID |
Specify the analytic instance identifier as a string. This parameter must be 20 characters or less. |
Descr |
Specify a description for this analytic instance as a string. |
&RecordRef |
Specify an already instantiated record object to pass values to the application package Create method that's associated with the analytic type definition. If you do not want to specify a record, you can specify NULL. |
ForceDelete |
Specify the behavior if the specified analytic ID already exists. This parameter takes a boolean value. If ForceDelete is set to false and the specified ID exists, this function terminates without creating a new analytic instance. If ForceDelete is set to true and the specified ID exists, the analytic instance is deleted and then recreated. |
Returns
An AnalyticInstance object if successful, null otherwise.