The standard filter functionality in Ax forms is a neat and powerful feature. Using this filter functionality in your code is something you'll definitely use at some point in time as a programmer. Although it's possible to do it in a single line of code, I prefer a 3 step solution. That way it's more flexible. Let me show you by example. We'll filter the customers records in form CustTable, only showing customers with currency USD. Step 1: Declare a class variable In the ClassDeclaration method of the form, define a range. QueryBuildRange CurrencyQBR; Step 2: Instantiate the new range. In the init method on the datasource of the form, you assign the range to a specific field (after the super call). public void init() { super(); CurrencyQBR = this.query().dataSourceName('CustTable').addRange(fieldnum(CustTable,Currency)); } Step 3: In the last step, you assign a value to the range. This is done in the executeQuery meth...
Blog mengenai tips dan trik soal komputer, gadget, dan software serta hardware