I was able to solve the problem as follows: 

if ((ordenaProduto 0|| (ordenaProduto 1)) {
        set ordemProd query.Get("fatiqtde")
elseif ((ordenaProduto 2|| (ordenaProduto 3)) {
        set ordemProd query.Get("valortotliq")
}

set ^mtempJOB(controladorjob,K1,K2,ordemProd,K3$listbuild(   codProduto
                                                                    ,descrProd
                                                                    ,(qtdOld+$select(BP2:query.Get("fatiqtde"),1:0))
                                                                    ,(pesoOld+$select(BP2:query.Get("peso"),1:0))
                                                                    ,(vlrOld+query.Get("valortotliq"))
                                                                    ,(brutoOld+query.Get("bruto")))