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 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);
Hello Martin,
Thanks for the answer. In that case I'll go for the primitive array and traverse through its elements.
No, I'm not aware of any such a method.
André Arnaud de Cal...
291,965
Super User 2025 Season 1
Martin Dráb
230,836
Most Valuable Professional
nmaenpaa
101,156