Edit

ReplaceField (fileDotFieldname, searchExpression, expression)

Result Type:  Number

Definition:  Analogous to the Advanced Replace command, this replaces the specified field in the records identified by the searchExpression by the expression.

Examples: 

ReplaceField("product.sellPrice", "category1=`BRONZE`", "sellPrice*1.20")

increases the sell price for all products whose category1 is "BRONZE" by 20%. The return value is the number of products that were changed.

ReplaceField("transaction.colour", "gross>10000", "`red`")

Sets the colour of all transactions with a gross more than $10,000 to red. The number of transactions that were changed is returned.

Note: As this function changes data (and there is no undo), it should be used with extreme caution.

Developer Note: If you are automating updates to individual records using Replacefield from a script (or REST client), such that you will be executing it a lot, be sure to use a search on an indexed, unique field of the record you are updating. Generating many automated searches of a non-indexed field would cause unnecessary server load.