command cdb_batchUpdate pInputA


Summary

This command makes changes to a number of records. It can access multiple tables.

Inputs

*optional parameter.

Update Input Diagram

Additional Requirements

This API call requires internet access.

API Version

Examples

local tInputA, tClientsTableID, tOfficeTableID

#Table name: clients                                               #Table name: office
#keys: firstName, lastName, age, income                         #Keys: name, address
#Record: 
#[12345678-abcd-1234-cdef-1234567890ab]["firstName"] - "John"     #[45678123-abcd-1234-cdef-1234567890ab]["name"] - "Smith's Tech"
                                       ["lastName"] - "Smith"                                            ["address"] - "123 officeRoad"
                                       ["age"] - "47"
                                       ["income"] - "100000"
 [87654321-abcd-1234-cdef-1234567890ab]["firstName"] - "Jenny"
                                       ["lastName"] - "Smith"
                                       ["age"] - "47"
                                       ["income"] - "100000"

put cdb_getTableID("clients") into tClientsTableID                                       
put cdb_getTableID("office") into tOfficeTableID

##Update John's record
put "48" into tInputA[tClientsTableID]["12345678-abcd-1234-cdef-1234567890ab"]["age"]

##Update Jenny's record
put "46" into tInputA[tClientsTableID]["87654321-abcd-1234-cdef-1234567890ab"]["age"]
put "99999" into tInputA[tClientsTableID]["87654321-abcd-1234-cdef-1234567890ab"]["income"]

##Update Smith's Tech's record
put "1234 office road" into tInputA[tOfficeTableID]["45678123-abcd-1234-cdef-1234567890ab"]["address"]

put "cloud" into tInputA["cdbTarget"]

cdb_batchUpdate tInputA

#The tables now look like this:
#Table name: clients                                               #Table name: office
#[12345678-abcd-1234-cdef-1234567890ab]["firstName"] - "John"     #[45678123-abcd-1234-cdef-1234567890ab]["name"] - "Smith's Tech"
                                       ["lastName"] - "Smith"                                            ["address"] - "1234 officeRoad"
                                       ["age"] - "48"
                                       ["income"] - "100000"
 [87654321-abcd-1234-cdef-1234567890ab]["firstName"] - "Jenny"
                                       ["lastName"] - "Smith"
                                       ["age"] - "46"
                                       ["income"] - "99999"

```