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

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Suggested Answer

Filter Form records based on checkbox form control.

(0) ShareShare
ReportReport
Posted on by 152

Hello all,

I have a form checkbox control that when its enabled i want to filter the form for all records that have a specific enum type on a field.

For example if checkbox is enabled, i wanna show on my form all records that are of type Invoices.

Thank you.

I have the same question (0)
  • Suggested answer
    Martin Dráb Profile Picture
    237,803 Most Valuable Professional on at

    Do you have any particular problem?

    In general, you can override modified() method of the checkbox, set a query range value and execute the query. For example:

    QueryBuildRange statusRange = SysQuery::findOrCreateRange(myTable_ds.queryBuildDataSource(), fieldNum(MyTable, Status));
    statusRange.value(this.checked() ? queryValue(MyStatusEnum::Invoiced) : SysQyery::valueUnlimited());
    myTable_ds.executeQuery();

    By the way, which version of AX are you using?

  • PaulaRystemi6 Profile Picture
    152 on at

    Hello Martin,

    Thanks for answering. I am using D365

  • Martin Dráb Profile Picture
    237,803 Most Valuable Professional on at

    All right, I moved the question from Dynamics AX Forum to Dynamics 366 Finance Forum. Please ask questions about D365FO in D365FO forums.

    Is there anything else you need to know about the solution? If not, please mark the verified answer. If you need something before your question can be considered answered, please tell us what it is.

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…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Finance | Project Operations, Human Resources, AX, GP, SL

#1
Martin Dráb Profile Picture

Martin Dráb 664 Most Valuable Professional

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 522 Super User 2025 Season 2

#3
Sohaib Cheema Profile Picture

Sohaib Cheema 303 User Group Leader

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans