niralibaan
6th February 2010, 11:09
Hi,
Hw can i comapare enum variable and long variables in if condition?
i.e.
if labour=11 then
{
}
here variable 'labour' is of type enum and i want to check if its value is 11 or not.By using above syntax i am getting error such as 'illigal type combination enum:long'.
so pls help me out in this matter.
Thanks and Regards,
Nirali
bdittmar
6th February 2010, 11:46
Hi,
Hw can i comapare enum variable and long variables in if condition?
i.e.
if labour=11 then
{
}
here variable 'labour' is of type enum and i want to check if its value is 11 or not.By using above syntax i am getting error such as 'illigal type combination enum:long'.
so pls help me out in this matter.
Thanks and Regards,
Nirali
Hello,
BaanERP Programmers Guide
Enumerates overview and synopsis
--------------------------------------------------------------------------------
Overview
Use these functions for handling enumerated domains and table fields.
Synopsis
domain
ask.enum
( string quescode(14), domain default_enumvalue [, arg ] ... )
string
enum.descr$
( string domain code(12), enum_expr [, string language_code] )
long
etol
( domain domain_value )
domain
ltoe
( long long_value )
void
set.enum.values
( enum_constant, ... )
void
set.ask.enum.values
( enum_constant, ... )
void
set.enum.values.for.field
( const string field.name.string, [ALL_ENUMS_EXCEPT], enum_value, ... )
void
set.initial.enum.values.for.field
( const string field.name.string, [ALL_ENUMS_EXCEPT], enum_value, ... )
Try this for example :
if field = enum then .....
eg. if tiitm001.kitm = tckitm.purchase then .....
or any of the above.
Regards
Han Brinkman
6th February 2010, 22:37
bdittmar's way is the best, however you can use the etol(<enum field>) function too.
Regards,
Han