Forum Discussion

JustinJustin1's avatar
JustinJustin1
Qrew Member
9 years ago

How to use JavaScript to concat child records into a single field?

I'm trying to learn how to concatenate multiple child records into a single field on a report. I have spent a lot of time searching google and the help forums and have come up with nothing. I don't want to use reverse look up because there could be a lot of records I'm returning or only 1. I figured the best way to accomplish this would be JavaScript. Maybe some tutorials on how to implement JavaScript functionality with QuickBase would help.

  • HI,
    I'm getting this text in the Childs field of the "Parents" table.




    <img qbu='module' src='/i/clear2x2.gif' onload="javascript:if(typeof QBU=='undefined'){QBU={};$.getScript(gReqAppDBID+'?a=dbpage&pagename=module.js&rand='+new Date().getTime())};"><div class=QBU_Childs data-rid=1></div>


    What is the thing that I missed. please Help. (I updated the Variables in the .js file )
    • _anomDiebolt_'s avatar
      _anomDiebolt_
      Qrew Elite
      The field needs to be a Rich Text Formula field. You have a Text Formula field currently.
    • VivekVishwanat3's avatar
      VivekVishwanat3
      Qrew Cadet
      I tried with Rich Formula Text Field. but I'm not successful.
      I'm getting result as

    • _anomDiebolt_'s avatar
      _anomDiebolt_
      Qrew Elite
      The code is generating two <li> bullets.

      More than likely you have not set the parameters correctly for your application. These parameters are from my demo application:

        //parameters:
        var dbid = "bkgzxdr4x";
        var dbidParents = "bkgzxdr6t";
        var dbidChilds = "bkgzxfptb";
        var apptoken = "q2aznmd9h7eymbwavpzjbsc8hcf";
        var n = 100;
        var relatedParentFid = "7";
        var relatedParentLabel = "related_parent";
        var clist = "3.7.10";
        var qbuClass = "QBU_Childs";