Question GUILHERME CRUZ ... · Jun 14, 2018 Sort ordering #Object Data Model #Caché I need to do an ordering, within another order, but it is not ordering. 0 1 611
Evgeny Shvarov · Jun 14, 2018 Hi, Guilherme!Please, elaborate what do you want to sort. GUILHERME CRUZ ... · Jun 15, 2018 In summary, I need to do an ordering within another order in a report. I have the ordering of the main grouping, and I need to sort the items in that grouping. Evgeny Shvarov · Jun 15, 2018 Could you please share a sample code with ordering of the main grouping to understand the problem better? GUILHERME CRUZ ... · Jun 15, 2018 I (agrup=1) { S COD = query.Get("pscodigo") I (COD="") S COD = "000" DESC = query.Get("psnome") I (DESC="") S DESC = "NAO DEFINIDO" (ordenacao=1) S K2=DESC_"^"_COD S K2=expert.completaString(COD,0,6)_"^"_DESC}S K3 = descrProd_"^"_codProduto_"^"_idProduto S ^mtempJOB(controladorjob,K1,K2,K3)=$LB(...) Robert Cemper · Jun 14, 2018 see this subject: Multi Language Sort GUILHERME CRUZ ... · Jun 18, 2018 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")))
GUILHERME CRUZ ... · Jun 15, 2018 In summary, I need to do an ordering within another order in a report. I have the ordering of the main grouping, and I need to sort the items in that grouping. Evgeny Shvarov · Jun 15, 2018 Could you please share a sample code with ordering of the main grouping to understand the problem better? GUILHERME CRUZ ... · Jun 15, 2018 I (agrup=1) { S COD = query.Get("pscodigo") I (COD="") S COD = "000" DESC = query.Get("psnome") I (DESC="") S DESC = "NAO DEFINIDO" (ordenacao=1) S K2=DESC_"^"_COD S K2=expert.completaString(COD,0,6)_"^"_DESC}S K3 = descrProd_"^"_codProduto_"^"_idProduto S ^mtempJOB(controladorjob,K1,K2,K3)=$LB(...) Robert Cemper · Jun 14, 2018 see this subject: Multi Language Sort GUILHERME CRUZ ... · Jun 18, 2018 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")))
Evgeny Shvarov · Jun 15, 2018 Could you please share a sample code with ordering of the main grouping to understand the problem better? GUILHERME CRUZ ... · Jun 15, 2018 I (agrup=1) { S COD = query.Get("pscodigo") I (COD="") S COD = "000" DESC = query.Get("psnome") I (DESC="") S DESC = "NAO DEFINIDO" (ordenacao=1) S K2=DESC_"^"_COD S K2=expert.completaString(COD,0,6)_"^"_DESC}S K3 = descrProd_"^"_codProduto_"^"_idProduto S ^mtempJOB(controladorjob,K1,K2,K3)=$LB(...) Robert Cemper · Jun 14, 2018 see this subject: Multi Language Sort GUILHERME CRUZ ... · Jun 18, 2018 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")))
GUILHERME CRUZ ... · Jun 15, 2018 I (agrup=1) { S COD = query.Get("pscodigo") I (COD="") S COD = "000" DESC = query.Get("psnome") I (DESC="") S DESC = "NAO DEFINIDO" (ordenacao=1) S K2=DESC_"^"_COD S K2=expert.completaString(COD,0,6)_"^"_DESC}S K3 = descrProd_"^"_codProduto_"^"_idProduto S ^mtempJOB(controladorjob,K1,K2,K3)=$LB(...)
Robert Cemper · Jun 14, 2018 see this subject: Multi Language Sort GUILHERME CRUZ ... · Jun 18, 2018 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")))
GUILHERME CRUZ ... · Jun 18, 2018 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")))
Hi, Guilherme!
Please, elaborate what do you want to sort.
In summary, I need to do an ordering within another order in a report.
I have the ordering of the main grouping, and I need to sort the items in that grouping.
Could you please share a sample code with ordering of the main grouping to understand the problem better?
I (agrup=1) {
S COD = query.Get("pscodigo")
I (COD="") S COD = "000" DESC = query.Get("psnome")
I (DESC="") S DESC = "NAO DEFINIDO" (ordenacao=1)
S K2=DESC_"^"_COD S K2=expert.completaString(COD,0,6)_"^"_DESC
}
S K3 = descrProd_"^"_codProduto_"^"_idProduto S ^mtempJOB(controladorjob,K1,K2,K3)=$LB(...)
see this subject:
Multi Language Sort
I was able to solve the problem as follows:
set ordemProd = query.Get("fatiqtde")
} elseif ((ordenaProduto = 2) || (ordenaProduto = 3)) {
set ordemProd = query.Get("valortotliq")
}
,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")))
Social networks
InterSystems resources
Log in or sign up
Log in or create a new account to continue
Log in or sign up
Log in or create a new account to continue
Log in or sign up
Log in or create a new account to continue