JAVASCRIPT IN ADOBE (QR CODE) - need to sort the data that is returned from QR code

Ok so I do have a background (newbie) in progamming C++,Java and C#. I am using the QR code feature of Adobe Forms. Unfortunately, the default javascript does not sort the data the way I have my fields laid out. It seems to group like items. Here is the code that comes default with the QR code. How do I get it to sort the data in the QR code the way I need it?

/* Customize: */
function bMemberOf(strName, aStrNames)
{
    for (var nMembIdx in aStrNames)
    {
        if (strName == aStrNames[nMembIdx])
            return true;
    }
    return false;
}

function strTabDelimited(oParam)
{
    
    var bNeedTab = false;
    var strNames = "";
    var strValues = "";
    
    for (var i = 0; i < oParam.oDoc.numFields; ++i)
    {
        var strFieldName = oParam.oDoc.getNthFieldName(i);
        if ((null == oParam.aFields || bMemberOf(strFieldName, oParam.aFields))
            && (null == oParam.strXclField || strFieldName != oParam.strXclField)
            && (oParam.oDoc.getField(strFieldName).type != "button"))
        {
            if (bNeedTab)
            {
                if (oParam.bFieldNames)
                    strNames += "\n";
                strValues += "\n";
            }
            if (oParam.bFieldNames)
                strNames += strFieldName;
            strValues += oParam.oDoc.getField(strFieldName).value;
            bNeedTab = true;
        }
    }
    if (oParam.bFieldNames)
        return strNames + "/n" + strValues;
    else
        return strValues;
}

try
{
    if ( app.viewerVersion >= ADBE.PMD_Need_Version )
        event.value = strTabDelimited({oDoc: this, aFields: 
[
"Driver1"
"JobNumber1", 
"JobName1", 
"Driver2",
"JobNumber2",
"JobName2"

]
, bFieldNames: false});
    else event.value = " ";
}
catch (e)
{
    event.value = " ";
}
How many English words
do you know?
Test your English vocabulary size, and measure
how many words do you know
Online Test
Powered by Examplum