Skip to main content

Notifications

Announcements

No record found.

Finance | Project Operations, Human Resources, ...
Suggested answer

How do i filter an enum type field on a form?

Posted on by 102

Hey! I am a beginner in working with ax 2012. I need to filter the form automatically by “status” (!ended, !report as finished). I have added ranges and they are displayed correctly, but if I try to search for the Ended status with CTRL+G, results are displayed for this as well. What should I do to limit the search to only the statuses I need?

pastedimage1674724916586v1.pngpastedimage1674724946421v2.png

  • Suggested answer
    DAnny3211 Profile Picture
    DAnny3211 9,272 Super User 2024 Season 1 on at
    RE: How do i filter an enum type field on a form?

    hi

    look this

    dynamicsaxhints.blogspot.com/.../how-to-add-enum-filter-with-all-element.html

    DAniele

  • MuthukumaranAX Profile Picture
    MuthukumaranAX 2,907 on at
    RE: How do i filter an enum type field on a form?

    I think you can achieve the solution in other way round, by adding not condition to your ranges for the status (ended and report as finished)

  • Pavel Ioana Profile Picture
    Pavel Ioana 102 on at
    RE: How do i filter an enum type field on a form?

    If I block the ranges, I won't be able to filter by any of the existing ones. I would like to filter only according to Released, Started or Created status, without including Ended or Reported as finished.

    pastedimage1674731830501v1.png

  • Martin Dráb Profile Picture
    Martin Dráb 230,235 Most Valuable Professional on at
    RE: How do i filter an enum type field on a form?

    That you added ranges in code doesn't prevent you from adding ranges in GUI.

    Maybe locking the ranges (by QueryBuildRange.status()) will give you what you want.

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,280 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,235 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Product updates

Dynamics 365 release plans