How Do You Use YQL With QuickBase?

  • 1
  • 2
  • Question
  • Updated 3 months ago
  • Answered

The other day I had a client inquire about snagging some data from a 3rd party web service and feeding it into QuickBase. I came up with a simple demo that allows you to (1) enter an ISBN-13 number, (2) blur the field and (3) script injected into the page using the image onload technique will fill in the QuickBase fields it finds from an external web service. The script uses YQL (Yahoo Query Language) to act as a proxy so that the data can cross domains without violating the same origin policy:

My Old Pal YQL ~ Best Friends Forever
https://haversineconsulting.quickbase.com/db/bi5trc6a8?a=nwr

Type in an ISBN-13 number and wait while the Details are fetched from this web service:

http://www.isbnsearch.org/

Tested ISBN-13 Numbers:

9781849519083
9781783559688
9781849697545

Pastie Database
https://haversineconsulting.quickbase.com/db/bgcwm2m4g?a=dr&rid=307
Notes:(1) I only implemented the logic on the add record form and I don't perform any extra error handling or feedback if something goes wrong.(2) The script uses the jQuery plugin YQL found here:
https://github.com/hail2u/jquery.query-yql
(3)Those three ISBN-13 numbers are all HighChart books. Collect them all!

Photo of Ⲇanom the ultimate (Dan Diebolt)

Ⲇanom the ultimate (Dan Diebolt), Champion

  • 30,224 Points 20k badge 2x thumb

Posted 5 years ago

  • 1
  • 2
Photo of Robert

Robert

  • 0 Points
Hi Dan, just wanted to say thanks for this. It's really useful for some stuff that I'm doing, and has sparked off a bunch of other thoughts too. Please keep posting these.
Photo of Ⲇanom the ultimate (Dan Diebolt)

Ⲇanom the ultimate (Dan Diebolt), Champion

  • 30,224 Points 20k badge 2x thumb
I got a million more ...

We have to besiege QuickBase to implement an officially support way of allowing a user to inject JavaScript into ALL page for unrestricted purposes. Currently we have to use the image onload technique but this only works on pages where we can display a field. It would be nice to do this on every QuickBase page including administrative pages. QuickBase could easily implement this feature - heck give me access to the source code and I will make the changes. Then the floodgates will open on what new features can be implemented as the JavaScript libraries that are available today and features that are coming in ES6 are tremendous.
Photo of Ryan

Ryan

  • 60 Points
Hey Dan! I'm trying to use this to access an iframe within a quickbase record, but it seems to skip over the <form> tag. Do you know how I could access the iframe, or if it's even possible?
Photo of Ⲇanom the ultimate (Dan Diebolt)

Ⲇanom the ultimate (Dan Diebolt), Champion

  • 30,224 Points 20k badge 2x thumb
I can't connect your question to the YQL but if this is the content within the <iframe id="myiframe"> you are attempting to target:

<div id="myContent"></div>

You can select into the <iframe> with this jQuery selector:

$("#myiframe").contents().find("#myContent")
Photo of G.Macri

G.Macri

  • 878 Points 500 badge 2x thumb
Hi Dan, do you have an updated guide now that YQL is no longer supported?