ProdRouteTrans prodRouteTrans; Query q; QueryBuildDataSource qDS; QueryBuildRange qRange; QueryRun qRun; ... while select * from vm_resources where vm_resources.resource_mask != "" && vm_resources.active == NoYes::Yes { q = new Query(); qDS = q.addDataSource( TableNum( ProdRouteTrans ) ); /* where condition: Qty only */ qRange = qDS.addRange( FieldNum( ProdRouteTrans, TransType ) ); qRange.value( queryValue( ProdRouteTransType::Qty ) ); qRun = new QueryRun( q ); while ( qRun.next() ) { /* get ProdRouteTrans data from query */ prodRouteTrans = qRun.get( TableNum( ProdRouteTrans ) ); ... } ... }
Microsoft AX 2012, X++, C#, SQL server, SSRS, Java, JavaFX, Oracle, PL/SQL, Delphi - codes examples, step-by-step tutorials, experiences.
Thursday, February 8, 2018
AX - How use Query with enum in where condition
When you need use enum item in Query where condition, use queryValue() function:
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment