Assign multiple child records simultaneously

  • 0
  • 1
  • Question
  • Updated 1 week ago
  • Answered

Hello,

I'm looking to add several child records to a parent in one go if possible. The parent is the Projects table. At the moment I have child tables for Diseases and Geographies which are added in the usual way. This is a bit of a hassle as there are usually 10+ geographies per project. I want to expand on this by adding more tags so we can fin relevant projects in the future. These tags will likely reside on one table and if necessary I can move the geographies and diseases to this table. 

My question is, is there a simple way to select and add several of these tags to the parent record, much like you see on numerous websites, including the field right below where I am typing now(!)? 

I am aware there is a wizard which sets up a button but I've only got the Essentials package which doesn't allow this. I'm not averse to upgrading if this is the right solution but wanted to throw it out there first. 

Thanks in advance

Photo of Matt

Matt

  • 62 Points

Posted 3 years ago

  • 0
  • 1
Photo of QuickBaseCoach App Dev./Training

QuickBaseCoach App Dev./Training, Champion

  • 65,280 Points 50k badge 2x thumb
I can do a demo for you of a Quick Select technique, if you like and then you can decide if you want to upgrade to the regular "Premier" plan.  The technique will allow you to launch off a Parent and then click click click to very quickly add the child rec records, and have full access to the usual report Dynamic Filters and search boxes to narrow does the choices for diseases and  geographies.  It usually just takes an hour or two to set up.  Contact me off line using the information in my profile if you would like a quick demo.
Photo of Oana Toma

Oana Toma

  • 60 Points
Is this Quick Select technique still a viable option with the current version of QuickBase? If so, what is the approach to implement it?
Photo of QuickBaseCoach App Dev./Training

QuickBaseCoach App Dev./Training, Champion

  • 65,280 Points 50k badge 2x thumb
I can help you set this up with about a 1 hour one on one consulting session, to explain the technique to you and implement it on a GoToMeeting screen sharing session.

Mark Shnier
Your Quick Base Coach
QuickBaseCoach.com
Photo of Gaurav Sharma

Gaurav Sharma

  • 5,884 Points 5k badge 2x thumb
can we done same through single button ?
Photo of Gaurav Sharma

Gaurav Sharma

  • 5,884 Points 5k badge 2x thumb
Hi Mark,

Can we do with a single button ?

I want to add 5 chlid records to a parent record through a single button.

Thanks,
Gaurav Sharma
Photo of Matthew

Matthew

  • 20 Points
Yes, this can be done with a single button.  

We do it through a custom formula field and code page.  Can pull/create any number of "child records" and assign them to the project.

Depending on the complexity and variability you want will affect the time to create, but I've done it just this week for other apps.
Photo of Gaurav Sharma

Gaurav Sharma

  • 5,884 Points 5k badge 2x thumb
Hi Matthew,

Can you show me, how have you achieved this ?

Thanks,
Gaurav
Photo of Matthew Neil

Matthew Neil

  • 31,678 Points 20k badge 2x thumb
Its is complicated, but you'd need a custom code page that makes and API call to create Tasks records associated with a parent Projects record.  You'll need a "Template Tasks" table for the API to reference what types of tasks you are trying to create.  Then a formula url field to run the script page and relay the important information to the script.
Do you have an application that needs this done?
Photo of QuickBaseCoach App Dev./Training

QuickBaseCoach App Dev./Training, Champion

  • 65,280 Points 50k badge 2x thumb
Gaurav.  If you want a button to Add 5 standard Children to a Parent, one option is to use the Copy Parent Child wizard to make that button for you.  It can import a standard set of children from a fixed template Parent record.
Photo of Tribs

Tribs

  • 20 Points
try this code. it pulls data from a master table and adds them as child records

function ImportIAB( CampaignID) {

 console.log("inside import" + CampaignID);

$.ajaxSetup({
    async: false,
    data: {
        apptoken: APPTOKEN
    }
});



      var Promise = $.get(DBID_IAB, {
           act: "API_DoQuery",
           qid: "5"                       // execute Query ID# ?
        });

$.when ( Promise ).then( function (xml) {
var data = $(xml);
// console.dirxml( data  );

                var CSV = "";
                var records = data.find("record");

// adding the Parent record ID to the CSV data.

$.each(records,function ( index, record) {
var rowID = $('record_id_', record).text();
                                CSV = CSV + CampaignID + "," + rowID + "\n";
        });

                console.log(CSV);
        //alert(CSV);

               try {

                  var Promise1 = $.get(DBID_CampaignIAB,{
                  act: "API_ImportFromCSV",
             records_csv: CSV,
          skipfirst: 0,
                  clist:  "6.10"
                  } );
               } catch (e) {
                  console.log("Error",e);
               }

               console.log("Import Executed");

               try{
                      $.when (Promise1).then( function (xml1) {
                 
                      
                   var import_count = $("num_recs_added", xml1).text();
                           window.location.hash = "tab_2";
                           window.location.reload(true);
                       });
               } catch (e) {
                      console.log("Error",e);
               }

   });    

return false;   
}