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
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.
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).
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
Under review
Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.
As AI tools become more common, we’re introducing a Responsible AI Use…
We are honored to recognize Abhilash Warrier as our Community Spotlight honoree for…
These are the community rock stars!
Stay up to date on forum activity by subscribing.
Community Member 4
Guy Terry 2 Moderator
Nayyar Siddiqi 2