SnapshotDataSource
Copies the contents of a data source and uses it to create a new in-memory data source. The contents of the in-memory copy and can be used and modified independently of the original.
Syntax
SnapshotDataSource( OriginalDataSourceName, SnapshotDataSourceName, ModelReference, FilterName, Refresh );
Parameters
Parameter Name | Type | Description | Optional? | Default Value |
---|---|---|---|---|
OriginalDataSourceName | String | The name of the data source to copy. | No | n/a |
SnapshotDataSourceName | String | The name of the new in-memory data source. | No | n/a |
ModelReference | String | The model reference associated with the chosen in-memory data source. If the function is called by a model, it assumes the data source exists within that model, so you do not need to specify a reference unless the data source exists in a different model on the same repository. If the function is called outside the context of a model - for example, in a web page expression or via the DATASOURCE element tag - you must specify the model containing the data source. | Yes | "" |
FilterName | String | The name of a filter associated with the data source. Only data that satisfies this filter will be included in the result of the function call. If this is left as an empty string, no filter will be applied. | Yes | "" |
Refresh | Boolean | Determines whether the function will refresh the data source before executing a query. The data source will only be refreshed once per postback. | Yes | 0 |
Output
If the new in-memory data source is successfully created, the function will return the number of rows retrieved from the original data source. If a new data source could not be created, the function will return a message specifying the problem.