RemoveRowsFromDataSource
Removes all rows in an existing data source that match a specific condition from the current session. Changes made with this function will only persist until the end of the current session and will not affect the underlying data.
To permanently remove a row from the data source, use the DeleteData function.
Syntax
RemoveRowsFromDataSource( DataSourceName, RemoveWhere, ModelReference );
Parameters
Parameter Name | Type | Description | Optional? | Default Value |
---|---|---|---|---|
DataSourceName | String | The name of the data source to update. | No | n/a |
RemoveWhere | String | The filter expression used to determine which rows to delete. This can include column names as well as operators. Literal strings can also be included but they must be surrounded by single quotation marks. In order to use a keyword value, the filter condition must be written within a variable and then referenced here. | No | n/a |
ModelReference | String | The model reference associated with the chosen 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 | "" |
Output
If successful, the function will return an empty string; otherwise, it will return an error message.