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

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Answered

finding min value in array

(0) ShareShare
ReportReport
Posted on by 1,274

Hello everyone,

I know it sounds strange but I need to find a min value in Array. Is there any standard method to do this? I checked collection class Array from here - https://docs.microsoft.com/en-us/previous-versions/dynamics/ax-2012/system-classes/gg802677(v=ax.60)?redirectedfrom=MSDN and I haven't found anything like that. Does that mean I need to create a primitive array and then traverse through it to find  a min value? For me it looks strange as there should be something standard inside AX to do this, I think.

Thanks.

I have the same question (0)
  • Verified answer
    Martin Dráb Profile Picture
    239,392 Most Valuable Professional on at

    No, I'm not aware of any such a method.

  • dark_knight Profile Picture
    1,274 on at

    Hello Martin,

    Thanks for the answer. In that case I'll go for the primitive array and traverse through its elements.

  • Verified answer
    ergun sahin Profile Picture
    8,826 Moderator on at

    I don't think so either. The closest I remember should be a method named min (). You can't use it in Array, but at least it gets rid of ifs.
    If I remember correctly it was used as below;

    int     minValue        = min(21,50,5,120);
    real    minRealValue    = min(20.1,15.2,15.1,30.1,50);

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the March Top 10 Community Leaders

These are the community rock stars!

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

#1
Giorgio Bonacorsi Profile Picture

Giorgio Bonacorsi 689

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 606 Super User 2026 Season 1

#3
CP04-islander Profile Picture

CP04-islander 356

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans