Replaces each found record in a database with the new field values.
[replacefounditems]field1=value1&field2=value2[/replacefounditems]To replace records in an ODBC-compliant table controlled by a SQL server, use the [SQL] context.
[index] | A number indicating this record's placement in the list. Note that this number is not taken from the database, but is purely a counter as the records are retrieved. |
[search db=base.db&neRefdata=0&Refsort=1]
[replacefounditems]Ref=[index][/replacefounditems]
[/search]
this context is much faster than the old technique of nesting a [replace] context inside a [founditems] context. For example: if you currently use something like this to modify many records in a database...
[search db=xx.db&neSKUdata=0]
[founditems]
[replace db=xx.db&eqSKUdata=[sku]]value=[math][value]+1[/math][/replace]
[/founditems]
[/search]
[search db=xx.db&neSKUdata=0]
[replacefounditems]value=[math][value]+1[/math][/replacefounditems]
[/search]
[search db=products.db&neSKUdata=0]
[replacefounditems]price=[math][price]*1.1[/math][/replacefounditems]
[/search]
This behavior is very different from the simpler [replace] context, which replaces all found items with the same value.
You may specify an absolute or relative path to the database file, as in "/WebCatalog/GeneralStore/somebase.db" or "../somebase.db". You may also place "^" in front of the database path to indicate that the file can be found in a global root folder called "Globals" inside the WebCatalogEngine folder.
Contrast between [replacefounditems] and [replace] | |||||
---|---|---|---|---|---|
[search db=products.db&neSKUdata=0] [replacefounditems] price=[math][price]*1.1[/math] [/replacefoundItems] [/search] | [replace db=products.db&neSKUdata=0] price=10 [/replace] | ||||
SKU | price before | price after | SKU | price before | price after |
1 | 5 | 5.5 | 1 | 5 | 10 |
2 | 10 | 11 | 2 | 10 | 10 |
3 | 15 | 16.5 | 3 | 15 | 10 |
4 | 20 | 22 | 4 | 20 | 10 |
5 | 35 | 38.5 | 5 | 35 | 10 |
DOWNLOAD WEBDNA NOW!
Amazon Web Services (AWS) README for Machine Image ID...
WebDNA LibrariesA list of available libraries for WebDNA...
Technical Change HistoryThis Technical Change History provides a reverse chronological list of WebDNA changes...
F.A.QA compilation of some user's questions...
[biotype]BioType is a behavioral biometrics WebDNA function based on ADGS research and development (from version 8...
Download WebDNA ApplicationsWebDNA applications...
...
[lineitems]Loops through all the line items in an order file...
[listpath]Breaks a path into separate foldernames and a filename...
[writefile][writefile] functions allows you to perform a wide variety of tasks...
Implement BioTypeHere is the JavaScript code that captures the keystroke dynamics of a demo user and how to make WebDNA analyze it...
[countwords]The number displayed is the number of words inside the context...