web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

Filter Data in grid

(0) ShareShare
ReportReport
Posted on by 385

form1.JPG

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

I have the same question (0)
  • Mohammad Raziq Ali Profile Picture
    2,476 on at
    RE: Filter Data in grid

    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.

  • Suggested answer
    Martin Dráb Profile Picture
    236,285 Most Valuable Professional on at
    RE: Filter Data in grid

    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).

  • Suggested answer
    Community Member Profile Picture
    on at
    RE: Filter Data in grid

    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.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Abhilash Warrier – Community Spotlight

We are honored to recognize Abhilash Warrier as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
Community Member Profile Picture

Community Member 4

#2
Guy Terry Profile Picture

Guy Terry 2 Moderator

#2
Nayyar Siddiqi Profile Picture

Nayyar Siddiqi 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans