...
Code Block | ||
---|---|---|
| ||
if (api.isSyntaxCheckisInputGenerationExecution()) { //necessary for now, Saving/compilation of the logic will complain about unknown table name "Sales_This" without this return } def sku = api.getElement("MaterialNumber") def tableCtx = api.getTableContext() def q = tableCtx.newQuery("Sales_This") q.select("sku") q.select("Turnover") q.select("SoldQuantity") q.select("OrderedQuantity") q.select("GrossMargin") q.where( "sku='$sku'" ) def data = tableCtx.executeQuery(q) if (data?.getRowCount() > 0) { api.global.salesData = data } |
...