Di AX apabila ingin melakukan query degnan 2 kondisi maka \.dataSourceTable(tablenum(SAN_INVENTREPORT)).addRange(fieldnum(table_name, field_name)).value
diulang sesuai dengan banyaknya kondisi
SAN_INVENTREPORT_ds.query().dataSourceTable(tablenum(SAN_INVENTREPORT)).clearRanges();
rangeReportID = SAN_INVENTREPORT_ds.query().dataSourceTable(tablenum(SAN_INVENTREPORT)).addRange(fieldnum(SAN_INVENTREPORT, ReportID));
rangeReportID.value(pecahstring);
rangeReportID.status(RangeStatus::Locked);
//kalau where ada dua berarti addrange lagi sama persis kayak order by dibawah
//query buat and dalam jumlah banyakczxczxczxc
if (hidenol == 1)
{
SAN_INVENTREPORT_ds.query().dataSourceTable(tablenum(SAN_INVENTREPORT)).addRange(fieldnum(SAN_INVENTREPORT, BegQTY)).value
("((BEGQTY !=0) || (ENDQTY !=0) || (PLUSQTY != 0) || (MINUSQTY != 0) || (BEGAMT != 0) || (ENDAMT != 0) || (PLUSAMT != 0) || (MINUSAMT != 0) )");
}
Tidak ada komentar:
Posting Komentar