02-19-2022, 09:00 AM
(09-10-2021, 04:52 PM)mark_talluto Wrote:(09-10-2021, 02:14 PM)philippecoenen Wrote: Is there a way for me to modify the record IdHi Philippe,
I already have a database and they have their records Id already. It's a UUID similar to the ones you are using but slightly different.
If I create new records that are not a problem (as these ids are alpha so it does not matter as long as they are unique).
But if I want to use existing records it's another problem.
I can definitively ignore your ids but I think it's a bit of waste.
However, if I can change an id or provide the id when I create a new record it will be OK.
Please let me know...
Best,
You can not change the existing record ID, but you can use your own ID in new records. They must meet the UUID format or the create command will generate an error.
You can export your existing database to either CSV or JSON. Read the data in and massage into an array.
Walk through each record and take your existing ID and place it in a cdbRecordID key.
While making your array, use the batchCreate API's format.
You can also upload your database one record at a time if that works for you. You would still use your existing ID in the cdbRecordID key to preserve your current ID value.
Let me know if you have any problems.
-Mark
Thanks for your answer,
I don't have a problem per se but before I try:
Can you tell me if uuid("random") in livecode would work for livecloud?
this is a version 4 (random) UUID
Best,
Phil