Skip to main content
Question

Is it possible to download the entire field list for a table?

  • October 14, 2016
  • 0 replies
  • 286 views

Is it possible to download the entire field list for a table?
This topic has been closed for replies.

(1) Go to the field page for the table - the URL has this format:


h t t p s ://<subdomain>.quickbase.com/db/<table dbid>?a=listfields

(2) Then press F12 to expose the developer tools for your browser

(3) In the console tab paste one of these two scripts


_.pluck(gTableInfo[gReqDBID].finfo, "name").join(",")

_.pluck(gTableInfo[gReqDBID].finfo, "name").join("\n")

(4) Copy out your list of field names

(5) Celebrate your newfound joy of using JavaScript

  • Author
  • Registered
  • October 17, 2016
I got to step 3 but nothing happened.  Do you have a little bit more explanation of the Step 3 naming process or is it exactly as you posted?

See Screenshot attached.

Hey this worked pretty slick!  Now if I am greedy and also want to include Field ID with the Field Label list, how do I add that piece?  I've tried to edit the code to add Field ID and FID like this, but this is not pulling any more than the record name.   _.pluck(gTableInfo[gReqDBID].finfo, "name", "fid").join("\n")

Here is the code to log the fid and field name to the console as a table display and as CSV:

console.table(_.map(gTableInfo[gReqDBID].finfo, (field, fid) => { return [fid, field.name]; })); console.log(_.reduce(gTableInfo[gReqDBID].finfo, (memo, field, fid) => { return memo + '${fid},${field.name}\n'; }, "" ));



Notes: 

(1) This code uses widely supported ES6 features:
  • backticks for string interpolation
  • fat arrow functions (ie =>)
I will increasingly use more ES6 features in my answers and demos and drop using jQuery. Ask if you need more information to make sense of the code.

(2) underscorejs is used to map gTableInfo[gReqDBID].finfo into an array of arrays in the first instance and to reduce gTableInfo[gReqDBID].finfo to a CSV string in the second.