Hi again Efrain,
Thank you for the example - that certainly works.
I don't seem to be able to modify the cdbRecordID however?
I recently used the import -> csv function in LCM to bulk import some tables from an SQL project where primary/foreign keys were already defined in UUID format.
As you know, i wasn't able to import the existing primary keys into the cdbRecordID key as that isn't supported during csv import, so I uploaded them to a new key called primaryKey
I was hoping to modify the cdb[cdbRecordID] key to match the primaryKey, but it just seems to fail silently.
I'm not sure if it's my code or if this isn't permitted by LiveCloud...
Here's the code:
Am i doing something majorly wrong or is this operation not permitted?
(i also tried this with batchMerge but got the message 'illegal key' -- but this doesn't seem to happen with update)
Many thanks!
Thank you for the example - that certainly works.
I don't seem to be able to modify the cdbRecordID however?
I recently used the import -> csv function in LCM to bulk import some tables from an SQL project where primary/foreign keys were already defined in UUID format.
As you know, i wasn't able to import the existing primary keys into the cdbRecordID key as that isn't supported during csv import, so I uploaded them to a new key called primaryKey
I was hoping to modify the cdb[cdbRecordID] key to match the primaryKey, but it just seems to fail silently.
I'm not sure if it's my code or if this isn't permitted by LiveCloud...
Here's the code:
Code:
on mouseUp pButtonNumber
local tTableDataA, tDataA, tTarget, tTableName, tID
put "dashboard" into tTableName
put "cloud" into tTarget
put cdb_read("dashboard", "*", "cloud") into tTableDataA
repeat for each element tElement in tTableDataA
put tElement["primaryKey"] into tDataA["cdb"]["cdbRecordID"]
put tElement["cdb"]["cdbRecordID"] into tID
cdb_update tDataA,tTableName,tID, tTarget
end repeat
end mouseUp
Am i doing something majorly wrong or is this operation not permitted?
(i also tried this with batchMerge but got the message 'illegal key' -- but this doesn't seem to happen with update)
Many thanks!