Forum Discussion
While it is always better to scrub your data before entry into a new system you can use script to automate the cleanup of data already in QuickBase.
This post received some bad formatting in the conversion to the new forum but it provided a general solution of specifying as set of regular expression patterns to clean up a set of records identified by a query:
What is the "Clear the Swamp" Technique?
https://haversineconsulting.quickbase.com/db/bgcwm2m4g?a=dr&rid=531
In a nutshell you supplied a set of parameters to identify what records and fields needed to be processed:
var dbid = "bmb3gqcsb";
var apptoken = "pkcstad5vrharc4664uucpt258d";
var qid = "1";
var fidSource = "6";
var fidSourceTag = "text1";
var fidTarget = "7";
var fidTargetTag = "text2";
var batchSize = 20;
And then a set of rules to apply to the records:
var rules = [{
name: "To Title Case",
pattern: /(?:^|\s)\w/g,
replace: function(match) {
return match.toUpperCase();
}]
The above rule converted the text in the field to UPPER CASE using a regular expression. to do the matching an a replacement function to do the substitutions. For safety the script was written to write the changes to new field but the source and target fid could point to the same field.
- BullseyeBullsey9 years agoQrew CadetLesson definitely learned, trust me :)
I will have to play around with this, thank you!