These are the screenshots of wat i have created pls help in order to create a form to filter the data using the button click
*This post is locked for comments
These are the screenshots of wat i have created pls help in order to create a form to filter the data using the button click
*This post is locked for comments
You are trying to run a code which is having syntax error
and the code which you have written will not solve what you are looking for.
you need to add range to the form datasource query
and rerun the form datasource executeQuery() method
Please verify and update us if you need any more technical help
The error says that your clicked() method isn't compilable. It's because QueryRun() expects a Query object, not a select statement. Look at How to: Create Queries by Using X++ [AX 2012] to learn basics of the query framework.
Nevertheless you shouldn't create a new query at all - if the form is set up as usual, it creates a query automatically and you merely want to add a range to filter what it returns. It might look like this:
QueryBuildDataSource qbds = Employee_1_ds.queryBuildDataSource(); qbds.addRange(fieldNum(Employee_1, EmpId)).value(queryValue(10)); Employee_1_ds.executeQuery();
Also note that AX 2012 already have a table for storing employees (HcmWorker).
Hi Shashank.m,
Where is your Filter Control in the above image?
You must use Filter control to filter the Grid, use it first, you can take TextBox control if you want to filter according to DepId field.
Please let us know and if it helps, please verify the solutions.
André Arnaud de Cal... 291,622 Super User 2024 Season 2
Martin Dráb 230,354 Most Valuable Professional
nmaenpaa 101,156