Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Artful Two for Clipper 5.0 - Norton Guide http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]

Syntax

RPLFIELDS( acTables, acFields, apValues )

Purpose

In each of the tables named, for records whose index key matches the
index-key value of the current record, replace fields named with macro
expansions of value expressions passed.

In some contexts this function may be more convenient than complicated
REPLACE WHILE statements. It is provided for multi-user code transparency.

Arguments

     acTables -- table name, or array of them

     acFields -- string of concatenated field names separated, if more than
                 one field name must be passed, by '|', or an array of such
                 strings

     apValues -- string of concatenated value expressions separated, if
                 more than one must be passed, by '|', or an array of such
                 strings

Setup

The arrays must be filled appropriately, the appropriate index must be in
control, and appropriate relations must be set. All records matching the
current key will have fields replaced. Do not use RPLFIELDS() on fields
contained in the current index key.

Example

     * Update some customer and order info

     LOCAL tables := { "CUSTOMER", "ORDERS" } , ;
           fields := { "PHONE|CREDCARD",
                       "PAY_TYPE|DETAILS" }, ;
           values := { "4169207395|000111222333", ;
                       "M|Paid by Mastercard" }
     RPLFIELDS( tables, fields, values )

Returns

.T. if successful, otherwise .F.

Side Effects

Replaces fields in multiple records in multiple tables.

Artful Calls

ABREAK, LOCKFILE (multi-user only)

Source File

AA_RPFLD.PRG, AM_RPFLD.PRG

See Also: RPL() RPLCHIFLDS() REPLACE_EM()

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson