Finding the first and last value in a baseenum

Hi

Is there eny function or method that will lookup the firts and last value of any given base enum

ex. I have a report dialog where filtering on item type is possible (From Item type / To Item type),
I want to default the values to the first and the last value in this enum

Tnx

Thomas

Try type casting the enum. Hope this will help.[:)]

Hi Thomas,

I have done some code in job.Please check that and modify as per your need.

{

StatusIssue status; // StatusIssue is the enum for which I printed the first and last element label
int i,_max,Eid;
str value1;
DictEnum dictEnum;
;
Eid = enumName2Id(“ABCModel”);
dictEnum = new DictEnum(Eid);

i = enumInit(Eid);
value1 = dictEnum.value2Label(i);
print value1;
_max = enumcnt(ABCModel);
print _max;
value1 = dictEnum.value2Label(_max-1);
print value1;
pause;

}

Please let me know, is it OK ??

bye[:D]