Forum Discussion

JoshuaTate's avatar
JoshuaTate
Qrew Cadet
8 years ago

How to pull field types and info from field page in console (Should be an export function in QB hack through console...)

Hi Quickbase Community,

I would like to pull out the field types and field info (for details like report link), from console along with the field names and ID's given Quickbase lacks an export function (that would be extremely beneficial in saving development time). I have plagiarised code from Dan and attempted to get back the field type info but am only getting double letter abbreviations which aren't telling me the whole story in some instances i.e text and rich text is returned as "TX". 

console.log(_.reduce(gTableInfo[gReqDBID].finfo, (memo, field, fid, type) => {
  return memo + '${fid},${field.name},${field.type}\n';
}, "" ));
_
Any help would be greatly appreciated, I can always muddle through wasting 5 minutes reformating a copy paste in excel (removing unnecessary " " in random fields that i don't get from a console dump). (P.S i am very tired at time of writing).

Kind regards,

Josh
  • You just need to map the two/three letter codes to human field types.

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

    >Quickbase lacks an export function

    QuickBase does not lack anything if you use script. It is simple to package the above console script into an API and give it any name you want Let's say you want to name your API with an action as follows:

    ?a=ExportSoIDontHaveToMuddleThroughReformattingInExcel

    Just create a Service Workers that monitors the fetching of this resource and returns they data the way you want. It is that simple.

    The QuickBase technology has reached convergence on your planet and everything is now doable. Yes I know the marketing and product managers are scratching their heads trying to understand  script product affordances that they did not put into their Agile burndown list but they like it when I say "everything is possible". They will come along eventually and embrace script.