Forum Discussion
_anomDiebolt_
8 years agoQrew Elite
A script similar to this entered through the console would number all existing records in the specified table in check numbering order (101, 102, 103) where the counting field was fid=6:
Pastie Database
https://haversineconsulting.quickbase.com/db/bgcwm2m4g?a=dr&rid=596
Notes:
(1) the basic idea is to build an array of rids containing the [Record ID#] of all existing records and to transform it into a blob of CSV which can then be imported using API_ImportFromCSV.
(2) You will need to implement your numbering code in place of my check numbering code show in bold below
Pastie Database
https://haversineconsulting.quickbase.com/db/bgcwm2m4g?a=dr&rid=596
Notes:
(1) the basic idea is to build an array of rids containing the [Record ID#] of all existing records and to transform it into a blob of CSV which can then be imported using API_ImportFromCSV.
(2) You will need to implement your numbering code in place of my check numbering code show in bold below
var csv = "";(3) You didn't specifically ask about how to number new records but the general idea there is to query for the most recent record, extract its unique number, increment it and stuff this new numbering value into the the appropriate field on the ?a=nwr form.
rids.forEach(function(rid, index) {
csv += rid + "," + (101 + index).toString() + "\n";
})