Meta Data Source
Meta Data Points
Meta points are configured by creating a “context” of existing points, which become available for access within the script when it executes. These context points can be any point saved in Mango at the time, including the current point being edited. The current point must be saved—i.e. cannot be “new”—before it will appear in the context point list.
The Data type determines the type that will be expected to be returned from the script. The point attempts to convert the returned value to this type.
Settable is whether the point can be manually set or not.
The Script context defines the points that will be available to the script when it executes. Each point that is added must be given a Var, which is the variable name the point data will be assigned to in the script. These script var names must be valid ECMAScript variable names. They must start with either a letter or an underscore, and may not contain spaces. Other constraints may apply. You will receive validation or script execution exceptions if script var names are not correctly defined. To add a point to the context select it from the list and click the icon. To delete an existing point from the context click the icon associated with the point. Points that are not needed in the script should not be added to the context since some overhead is involved in preparing the data for the script. Also, unnecessary script vars may cause unintended script executions (see “Script execution” below. However, the contrary may also be true: it may be useful to include a script var in a context in order to cause script execution.
When creating a new Meta Point sometimes it is helpful to backfill values for it. This can be done by the generate history link in the Data Points table.
The most recent saved value for all Context Points is found and that date is used for the Starting date for the simulation. (If any context point has no saved values the Generation will fail here)
The oldest saved value for the Meta Point is found and that is used as the Ending date for the simulation. (If no values exist the current time is used)
The simulation is run from Starting to Ending times and a values are created and saved according to the Meta Point settings.
This means that a history can only be generated for times before the earliest Meta Point value.