Forum Discussion

MattMatt's avatar
MattMatt
Qrew Trainee
9 years ago

Assign multiple child records simultaneously

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

10 Replies

  • 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.
    • OanaWhalen's avatar
      OanaWhalen
      Qrew Cadet
      Is this Quick Select technique still a viable option with the current version of QuickBase? If so, what is the approach to implement it?
    • QuickBaseCoachD's avatar
      QuickBaseCoachD
      Qrew Captain
      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
  • 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
  • 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.
  • MCFNeil's avatar
    MCFNeil
    Qrew Captain
    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?
  • 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.
  • 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;   
    }