Hi

then try this

   int         counter;
   SysDictEnum SysDictEnum;;

   SysDictEnum = new SysDictEnum(EnumNum(ABC));
   for (counter =  0;
        counter <= enumcnt(ABC)-1;
        counter++)
   {
       info(int2str(sysDictEnum.index2Value(counter)));
   }


Mit freundlichen Grüßen / Best regards / Med venlig Hilsen


Jesper J¢rgensen
Consulting

mailto: [EMAIL PROTECTED]

Aston Business Solutions GmbH
Kettelerstr. 3-11
D-97222 Würzburg-Rimpar
Germany Tel. +49-9365-8075-0
Fax +49-9365-8075-300



http://www.astongroup.de The information transmitted is intended only for the person or entity to which it is addressed and may contain confidential and/or privileged material. Any review, retransmission, dissemination or other use of, or taking any action in reliance upon this information by persons or entities other than the intended recipient is prohibited. If you received this in error, please contact the sender and delete the material from any computer.





Original Message processed by Tobit InfoCenter Subject: [development-axapta] Re: How to access enum values in loop (15-Sep-2003 12:45)
From: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]


Hi All,

Thanks for reply.......
But It didn't solve my problem. It seems that I am not able to ask question in proper way......


I am writing a job to populate data in table....
In the job I want to insert the values from enum in the column.
there are 10 values in enum and I want to insert those 10 values as different rows....so I am using a loop.
In that loop I want to assign .....


ABCTable.ColumnName = Enumvalue of enum at element equal to Counter ;

then I use --> ABCTable.insert();

but, in loop i am not able to get value of the element at position equal to counter, in the enum.
How should I do that?


Thanks,
Prabodh Kelkar



--- In [EMAIL PROTECTED], <[EMAIL PROTECTED]> wrote:
Hi,
try this.
    int         counter;
    SysDictEnum SysDictEnum;;
    SysDictEnum = new SysDictEnum(EnumNum(ABC));
    for (counter =  0;
         counter <= enumcnt(ABC)-1;
         counter++)
    {
        info(SysDictEnum.index2Label(counter));
    }

Mit freundlichen Grüßen / Best regards / Med venlig Hilsen
Jesper J¢rgensen

Original Message processed by Tobit InfoCenter Subject: [development-axapta] Re: How to access enum values in loop
(15-Sep-2003 11:32)
From:    [EMAIL PROTECTED]
To:      [EMAIL PROTECTED]


Hi,
Thanks for quick reply....
But this is not my problem.
say that there is enum "TestEnum1" with 4 elements "A","B","C" and "D". I want to print "A","B","C" and "D".......
I want to do this using a for loop with counter i...
How to get the element of enum "TestEnum1" at position i, programmatically and print it........
Thanks,
Prabodh Kelkar




--- In [EMAIL PROTECTED], Harry <[EMAIL PROTECTED]>
wrote:
> hi
> > int i = 0;
> > while (i<= enumcnt(nameofenum))
> {
> i is the value of enum, do something with i.
> i++
> }
> > will work as long as the useenumvalues property of the enum is
set
to true
> > regards
> > harry deshpande
> > -----Original Message-----
> From: prabodh_kelkar [mailto:[EMAIL PROTECTED]
> Sent: Monday, 15 September 2003 9:08 p.m.
> To: [EMAIL PROTECTED]
> Subject: [development-axapta] How to access enum values in loop
> > > Hi,
> I want to use the values of enum in loop. > I want to use the counter of the loop to navigate through the > elements/values of an enum. i.e. I want to get next value of enum as > loop navigates......How to do that?
> Help will be highly appreciated........
> Thanks,
> Prabodh Kelkar
> > > > > > > Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/



Yahoo! Groups Sponsor ADVERTISEMENT




Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.



Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.




Yahoo! Groups Sponsor ADVERTISEMENT
Click Here!


Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.

Reply via email to