Hi -
I have been working on this line of requirement
"If TRANSACTIONORIGIN=Purchase order or Vendor invoice, and PAYMENTDATE<>blank, then select all"
I need to achieve this on my custom form that I have created. I cant figure out how to code this query with special syntax. So far what I have written is pasted below. Note this is init() method on my datasource
Query query; QueryBuildDataSource qbdsTransOrigin, qbdsVendTrans,qbdsVendInvoiceTrans; QueryBuildRange queryBuildRange,queryBuildRange2; query = new Query(); super(); qbdsTransOrigin = query.addDataSource(tableNum(ProjItemTrans), tablestr(ProjItemTrans)); qbdsVendTrans = query.addDataSource(tableNum(VendTrans), tablestr(VendTrans)); qbdsVendInvoiceTrans = query.addDataSource(tableNum(VendInvoiceTrans), tablestr(VendInvoiceTrans)); qbdsVendInvoiceTrans.relations(true); qbdsVendTrans.relations(true); queryBuildRange = qbdsTransOrigin.addRange(fieldNum(ProjItemTrans, TransactionOrigin)); queryBuildRange2 = qbdsVendTrans.addRange(fieldNum(VendTrans, LastSettleDate)); queryBuildRange.value(strFmt('((%1 == %2) && (%1 == %3)))', fieldStr(ProjItemTrans, TransactionOrigin), any2int(ProjOrigin::PurchaseOrder), any2int(ProjOrigin::VendorInvoice))); I need to satisfy this requirement "If TRANSACTIONORIGIN=Purchase order or Vendor invoice, and PAYMENTDATE<>blank, then select all"
How can I do this with code ? I cant seem to understand how to code the range for Date variable (and PAYMENTDATE<>blank)?
If someone can help me write this line in code that will be really appreciated.
Please ask me if you have any questions.
Regards-
*This post is locked for comments