• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
RecordID list
#1
If I have a key that I am using as a linking key that contains multiple recordID's, how do I use this list of comma or "return" delimited data in an update API?
I have seen several code snippets that use different code versions to use these values.
an example: I may have a key  that has :
1f24ac4b-2181-4f7c-8796-d5715d22ff9c
64795139-3f41-4fd0-8505-96ea1f9ebd4a
edaea51d-5def-46c9-b226-bcfe529763e0
2a6b8442-8583-4fdc-a64b-fdadd00fe63b
or 
1f24ac4b-2181-4f7c-8796-d5715d22ff9c, 64795139-3f41-4fd0-8505-96ea1f9ebd4a,edaea51d-5def-46c9-b226-bcfe529763e0,2a6b8442-8583-4fdc-a64b-fdadd00fe63b
( two different list of recordID's)
Which scripting technique would I use?
I remember a scripting code that used a "replace comms with if" to delimit the records.
It seems as though there are several sample code snippets that are suggested depending on how you select them from the LCM window.
I am sorry if this sounds confusing!
BTW, I post questions for the benefit of other users too!
  Reply
#2
Hi Clarence,

The apis cdb_read, cdb_readKeys, cdb_delete, cdb_deleteKeys, cdb_sort, and cdb_sync all take line-delimited lists of recordIDs as parameters. So, in the case of using those APIs, it is best to store and retrieve the recordIDs as a line-delimited list so it can just be passed in directly. Cdb_update does not accept a line-delimited list of recordIDs, however. To update multiple records at once, an array must be built as input for cdb_batchUpdate. In that case, you can repeat for each line in your list of recordIDs and build the update input array appropriately.
  Reply
#3
Thanks,
I'll work with that.
  Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)