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)

Month year combo box

(0) ShareShare
ReportReport
Posted on by

Hi,

Good day, I would like to ask if in AX is there any enum for month and year selection? I hope anyone can ask me this question. Thank you. 

Ivan

*This post is locked for comments

  • Ludwig Reinhard Profile Picture
    on at
    RE: Month year combo box

    Hello Ivan,

    Do you mean something like 2016-07, 2016-08, 2016-09, etc.?

    Ludwig

  • SII1MNL Profile Picture
    on at
    RE: Month year combo box

    Hi Ludwig,

    Yes. something like that because I am using the datefield and I don't know if there is something like month-year instead

  • Suggested answer
    Martin Dráb Profile Picture
    on at
    RE: Month year combo box

    No, it isn't and can't be. It would be an infinite list.

    Choose a period you're interested in (e.g. 12 months from the current date), put it into a temporary table and create a lookup based on this temporary table.

  • SII1MNL Profile Picture
    on at
    RE: Month year combo box

    Hello Martin,

    I use datefield and any number i choose it will automatically set (example: I choose June 20 but it will set by June 30 using endmth method and datestryr from January) I think this is okay?

  • Suggested answer
    Mea_ Profile Picture
    on at
    RE: Month year combo box

    Hi Ivan,

    You can create new EDT and set "DateDay" property to "Day not shown". When you will add it to a dialog it will show you only month and year without day. Than you can use endmth  in you code to convert any selected date to end of the month date.

  • Martin Dráb Profile Picture
    on at
    RE: Month year combo box

    Ivan, yes, you can use the date selection. I told you how to build the combobox, because I thought that was your requirement.

  • SII1MNL Profile Picture
    on at
    RE: Month year combo box

    Martin, I would like to ask also if for the combobox is it also possible like example you have Jan-dec 2016, Jan-dec 2017 and so on? also the previous years?

  • Suggested answer
    Martin Dráb Profile Picture
    on at
    RE: Month year combo box

    Yes, it's possible - that's what I addressed in my first reply. You would generate texts such as Jan 2016, Feb 2012 and so on, put them into a temporary table and show the table in a lookup.

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…

Pallavi Phade – Community Spotlight

We are honored to recognize Pallavi Phade as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans