02-14-2020, 08:47 PM
(02-14-2020, 02:56 PM)sid Wrote: Hi Guys
I have a new problem , The above code to put in Data into the datgrid works great , but it leaves out the cdbRecordID as a key.
I created a hidden cdbRecordID as a hidden colomn in the datagrid so i can use it to edit records from a button within the datagrid.
the repeat script Efrain came up with at the top of the page gives me all the keys and their records correctly, but leaves out the cdbRecord ID
Could you help with this please?
Hi sid,
I took the repeat code from your previous post and slightly modified it to include the recordID
Code:
repeat for each key xRecordID in tOutputA[tTableID][1]
add 1 to tCount
put tOutputA[tTableID][1][xRecordID]["cdb"]["cdbRecordID"] into tRecordID
put tRecordID into tDataA[tCount]["cdbRecordID"] //ADDED THIS LINE TO INCLUDE THE recordID
repeat for each item xKeyName in tKeys
put tOutputA[tTableID][1][xRecordID][xKeyName] into tDataA[tCount][xKeyName]
end repeat
end repeat