Looping Through Enum

Sometimes you may need to loop through Enum. To do this, you can use List Data Type.

local procedure EnumLoop()
var
    MyEnum: Enum "My Enum";
    EnumIndex: List of [Integer];
    iMax, iLoop : Integer;
begin
    EnumIndex := ScanSource.Ordinals();
    iMax := EnumIndex.Count();

    If iMax <= 0 then
        exit;
    
    iLoop := 1;
    repeat //loop here
      MyEnum :=...

Continue Reading thatnavguy’s Article on their blog

https://thatnavguy.wordpress.com/2021/03/12/looping-through-enum/

Blog Syndicated with thatnavguy’s Permission

More About This Author

Teddy
Experienced NZ-based NAV Developer and Consultant with 10+ years of experience leading multiple IT projects, performing business analyst, developing, implementing, and upgrading Dynamics NAV and Business Central.
I have led multiple Dynamics NAV and Business Central projects for businesses in Asia, such as Japan, Singapore, and Indonesia, and currently in both Australia and New Zealand.
I am passionate to deliver solution that focuses on user-friendly interface while keeping high standard of compliance with the needs. I believe in adding value to people’s lives and try to leave people better than when I first met them.

Author: Teddy

Experienced NZ-based NAV Developer and Consultant with 10+ years of experience leading multiple IT projects, performing business analyst, developing, implementing, and upgrading Dynamics NAV and Business Central. I have led multiple Dynamics NAV and Business Central projects for businesses in Asia, such as Japan, Singapore, and Indonesia, and currently in both Australia and New Zealand. I am passionate to deliver solution that focuses on user-friendly interface while keeping high standard of compliance with the needs. I believe in adding value to people’s lives and try to leave people better than when I first met them.

Share This Post On
Share via
Copy link
Powered by Social Snap