What is Gimme All The Datas?

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

What is Gimme All The Datas?

Photo of Ⲇanom the ultimate (Dan Diebolt)

Ⲇanom the ultimate (Dan Diebolt), Champion

  • 30,064 Points 20k badge 2x thumb

Posted 3 years ago

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

Ⲇanom the ultimate (Dan Diebolt), Champion

  • 30,064 Points 20k badge 2x thumb
Gimme All The Datas is the greatest QuickBase technique ever released by Haversine Consulting which gives you universal access to any scrap of data within your QuickBase account. See Press Release attached.

Below are three examples of using Gimme All The Datas to extracting various information from the "main?a=myqb" page using each of the three supported extraction techniques.

Example 1 ~ Extract Data From Global Variables Within Page

var url = "main?a=myqb";
gimmeAllTheDatas(url, function(win, doc, src) {
  return _.map(win.input.appsListData, function(app) {
    return {dbid: app.dbid, name: app.name};
  });
}).then(function(data) {
  console.log(JSON.stringify(data, null, "  "));
});

Output:

[
  {
    "dbid": "bkmqf9eyh",
    "name": "All the Datas"
  },
  {
    "dbid": "bgcwm2m3z",
    "name": "Pasties"  },
  {
    "dbid": "bkm7dcz8p",
    "name": "Count My Fruits"
  },
  ...
  {
    "dbid": "bkjvdanjg",
    "name": "QuickBase Personality Test"
  }
]

Example 2 ~ Extract Data From DOM Notes Within Page

var url = "main?a=myqb";
gimmeAllTheDatas(url, function(win, doc, src) {
  return $("#appsListTable1 tr:gt(0)", doc).map(function() {
    return $("td:eq(2) a span", this).text();
  }).get();
}).then(function(data) {
  console.dir(data);
});

Output:

0: "All the Datas"
1: "Pasties"
2: "Count My Fruits"
...
62: "QuickBase Personality Test"

Example 3 ~ Extract Data From HTML Text of Page

var url = "main?a=myqb";
gimmeAllTheDatas(url, function(win, doc, src) {
  var countVowels = 0;
  src.replace(/<!--(.|\s)*?-->/gm, function(p0) {
    var matches = p0.match(/[aeiou]/gi);
    if (matches !== null) {
      countVowels += matches.length;
    }
  });
  return countVowels;
}).then(function(data) {
  console.log("Total number of vowels within HTML comments = " + data);
});

Output:

Total number of vowels within HTML comments = 2069

Gimme All the Datas
https://haversineconsulting.quickbase.com/db/bkmqf9eyh


Pastie Database
https://haversineconsulting.quickbase.com/db/bgcwm2m4g?a=dr&rid=494


Notes:

More to come ...
Photo of rocketc

rocketc

  • 774 Points 500 badge 2x thumb
Dan, gimme all the datas sounds very cool and I'm a "low coder" for sure. I'm would like to get a better understanding of how this technique works....

Within many of my applications.....I need to have summary fields on tables that may not be directly related.....It would be great to have the ability to create summary/roll-up fields for tables that may not be directly related.........

Would gimme all the datas be used to accomplish this?

Would you share an implemented example of gimme all the datas?

Thank you again for your continuing effort to move Quickbase forward.
Photo of Ⲇanom the ultimate (Dan Diebolt)

Ⲇanom the ultimate (Dan Diebolt), Champion

  • 30,064 Points 20k badge 2x thumb
gimmeAllTheDatas is a function that allows you to extract any data from any QuickBase page. This is no exaggeration - it can extract any information whatsoever with no limitations. It has two arguments: url and fn:

gimmeAllTheDatas(url, fn)

The first argument url is just the URL of the page you want to extract some data from. It can be any QuickBase page including administrative pages. The second argument is an extraction function which has three arguments:

fn(win, doc, src)

Each of the three arguments is a convenient handle to extract data in three different ways. win is a reference to the window object of the dynamically loaded iframe. doc is a reference to the document object of the dynamically loaded iframe. Finally src is a string representing the source of the of the dynamically loaded iframe.

The primary usage of gimmeAllTheDatas would be to build wizards, automation scripts, maintenance tasks as it can extract any QuickBase data without using application tokens or page nonces. Application tokens actually prevent you from iterating across your applications because you may have used different application tokens for each individual application.

There is a second function named submtmeAllTheForms (which I have not yet published) which is even more powerful as it allows you to invoke any QuickBase functionality under script control. Both of these functions (which share some similar features) will allow complete automation of anything you may want to do with QuickBase.

Regarding "low code" - this is a marketing meme that is sweeping through the industry and promoted by the likes of Forrester, Gartner and other industry trend watchers. I think it is silly. My version of low code is to use functional programming techniques and other abstractions provided by various JavaScript libraries and a heavy does of Category Theory as it is the penultimate mathematical abstraction - and it is funny:

http://te.xel.io/img/posts/2015-02-22-category-theory-and-human-behavior/functor-joke.jpg