UpdateRowsInDataSource

Updates all data rows that match a specific condition within 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 write the changes to the data source, use the WriteData function.

Syntax

UpdateRowsInDataSource( DataSourceName, UpdateWhere, KeywordValues, ModelReference, DatabaseColumnNames );

Parameters

Parameter Name Type Description Optional? Default Value
DataSourceName String The name of the data source to update. No n/a
UpdateWhere String The filter expression used to determine which rows to update. 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
KeywordValues String A comma-separated list of keywords whose values should be updated. These must be listed in the matching data source field order. 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 ""
DatabaseColumnNames String A comma-separated list of column names, which can be used to override the data source field order. If used, the first column listed here will be given the first value listed in KeywordValues, and so on. Yes ""

Output

If successful, the function will return an empty string; otherwise, it will return an error message.