QuickBase API Cookbook v3 - Recipe #3
Create records in table 3, using data from tables 1 & 2
Create records automatically
You want to create records automatically in a table, using data from a different table.

require 'QuickBaseClient'

#
# This script reads the list of records from a Documents table and a Doctors table
# And creates mssing records in a Progress table for all the combinations of Doctors and Documents
#

# Check the command line for username, password ---------------------
if ARGV.length == 1 and ARGV[0] == "?"
   puts "\n\nUsage: ruby makerecs.rb username password\n\nThis program adds records to the Progress table\nfor each record added to the Documents table.\n\n"
   exit 1 
elsif ARGV.length > 1
   username = ARGV[0]
   password = ARGV[1]
else
   puts "\nPlease enter your username and password, e.g.\n\n\truby makerecs.rb fred amliw\n\n"
   exit 1 
end

documentsDBID = "xxxxxxxxx" # fictitious!   please use a valid table dbid
doctorsDBID = "yyyyyyyyy" # fictitious!   please use a valid table dbid
progressDBID = "zzzzzzzzz" # fictitious!   please use a valid table dbid

# Signin  to QuickBase ----------------------------------------------
qbc = QuickBase::Client.new( username, password )

# Collect the record IDs from the Documents table -------------------
documentRids = qbc.getAllRecordIDs( documentsDBID ) #Documents table
puts "Document IDs = #{documentRids.join( ',' )}"

# Collect the record IDs from the Doctors table ---------------------
doctorRids = qbc.getAllRecordIDs( doctorsDBID ) #Doctors table
puts "Doctor IDs = #{doctorRids.join( ',' )}"

# Collect the Document and Doctor IDs from the Progress table -------
progressIDs = qbc.getAllValuesForFields( progressDBID, [ "DoctorID", "DocumentID" ] ) # Progress table

puts "Progress Document IDs = #{progressIDs["DocumentID"].join(',')}"
puts "Progress Doctor IDs = #{progressIDs["DoctorID"].join(',')}"

# Collect the Documents that are missing from the Progress table ----------------
missingProgressDocuments = Array.new
documentRids.each{ |documentRid| 
        if not progressIDs["DocumentID"].include?( documentRid )
           missingProgressDocuments << documentRid
        end
   }

puts "Missing Progress Document IDs = #{missingProgressDocuments.join(',')}"

# For each missing Document, add a record to the Progress table for each Doctor -
missingProgressDocuments.each{ |documentRid|
   doctorRids.each{ |doctorRid|
      qbc.clearFieldValuePairList
      qbc.addFieldValuePair( "DocumentID", nil, nil, documentRid )
      fieldValueList = qbc.addFieldValuePair( "DoctorID", nil, nil, doctorRid )
      qbc.addRecord( progressDBID, fieldValueList )
   }
}

# Signout from QuickBase --------------------------------------------
qbc.signOut

This is just one example solution that may not be precisely what you are looking for.  However, it should be possible to follow the basic logic in this script to address your particular situation.
makerecs.rb
Ruby wrapper for QuickBase HTTP API One-Click Ruby Installer for Windows
Created on Sept. 29, 2006 at  4:43 PM (PDT). Last updated by Quick Base on Oct.  1, 2006 at 12:05 PM (PDT). Owned by Quick Base.
Quick Base
Quick Base
Show fields from Show fields from Show fields from a related table
Report Name *
Description
Reports and Charts Panel
Each table has a panel listing its reports and charts, organized in groups.
Please wait while your new report is saved...
Field label
Column heading override
Justification
What does auto mean?
Fields in:

Fields to Extract:

Name for the new table:
Items in the new table are called:

When you bring additional fields into a conversion, Quickbase often finds inconsistencies. For example, say you're converting your Companies column into its own table. One company, Acme Corporation, has offices in New York, Dallas and Portland. So, when you add the City column to the conversion, Quickbase finds three different locations for Acme. A single value in the column you're converting can only match one value in any additional field. Quickbase needs you to clean up the extra cities before it can create your new table. To do so, you have one of two choices:

  • If you want to create three separate Acme records (Acme-New York, Acme-Dallas and Acme-Portland) click the Conform link at the top of the column.
  • If the dissimilar entries are mistakes (say Acme only has one office in New York and the other locations are data-entry errors) go back into your table and correct the inconsistencies—in this case, changing all locations to New York. Then try the conversion again.

Read more about converting a column into a table.

We're glad you're interested in doing more with Quickbase!

Now we need to make you official before you share apps or manage your account.

Verifying your email lets you share Quickbase with others in your company.

Your work email
Your company