Is there a reference document anywhere that explains the QuickBase javascript functions like GetFieldValue, UpdateCDDFids, and so on?

  • 0
  • 1
  • Question
  • Updated 4 years ago
  • Answered

These examples are found in the editRecord.js script file.

Photo of Phillip


  • 0 Points

Posted 4 years ago

  • 0
  • 1
Photo of Ⲇanom the ultimate (Dan Diebolt)

Ⲇanom the ultimate (Dan Diebolt), Champion

  • 30,434 Points 20k badge 2x thumb
Here is the available documentation:

You will notice that QuickBase has removed comments and whitespace to minimize the size of the file for downloading. Unfortunately, this makes the code difficult to read for the curious without using a utility such as jsbeautifier to untangle the code:


Now QuickBase never intended for users to read or use this code directly so there is no other user documentation. Therefore I created some documentation using the jscomplexity utility and attached a pdf of my processed results:


Noteworthy among the results are these observations:

1) There is a function named DeMorganize() - which is a reference to De Morgan's Law - from which I rightly conclude that among the original creators of QuickBase were MIT electrical engineers.

2) There is a function named InviteNewlyAddedUsers() which has a solitary reference to the cutting edge Angular Superheroic JavaScript MVW Framework

3) The function menu.onclick has a Cyclomatic Complexity Density metric of both Infitniy% and 100% which is kinda cool. Makes me want to watch that documentary about mathematician Gregor Cantor ...

Dangerous Knowledge
Beneath the surface of the world, are the rules of science. But beneath them, there is a far deeper set of rules – a matrix of pure mathematics which explains the nature of the rules of science and how it is way we can understand them in the first place.
4) If you run the beautified code through jslint or jshint you will get a pile of warnings:



5) There is a function named PerformRuleAction() which has an impressive Halstead Effort metric of 152500 !

So what does all this mean? Well like most software QuickBase's codebase has a lot of old code and some new code fragments sprinkled about. The old code does the job it was intended to at the time it was written while the new and more modern code is introduced where feasible or possibly as an experiment. This odd state of affairs is just the hard realities of software development not even unique to QuickBase. Now what has happened in parallel with QuickBase's development is that there has been an explosion of developments in web technologies, frameworks, libraries, preprocessors and tooling where even experts in the field can't keep up with the pace of innovation and development. Now when users like yourself see a feature they would like to have in the product the idea never enters the pipeline for development consideration unless there is an internal or external champion for the feature or there is a suggestion in the UserVoice service:


If you want a feature and it does not get prioritized in QuickBase's development process you have to Monkey Patch it yourself using script as you are appear to be exploring with this question. While I am the king of Monkey Patching QuickBase in this quadrant (technically Ramius from quadrant four has me beat but it isn't a fair comparison since their QuickBase is based on Scala and runs on quantum computers) you have to be very careful how you do this. If you start mucking around with QuickBase's authored code one day your enhancements will simply stop working without notice when QuickBase has a new release and changes some implementation code that is not part of a published API.

If you read and understood this whole post I will offer you two options you should pursue in parallel. In a new question ask specifically about what you want to accomplish and I will show you a way to Monkey Patch QuickBase in what I consider to be a way that will minimize conflicts and interactions with QuickBase's native code. Package up your feature request into UserVoice and emphasize that you are looking for a general way to use the suggested feature through an API of some sort.
Photo of Phillip


  • 0 Points
Thanks, Dan. That was both helpful and humorous.