case with option string

stampestampe Member Posts: 48
edited 2002-03-04 in Navision Financials
Is it possible to use an option string in a optionstring ?

eksamble

myvar optionstring = a,b,c

case myvar of myvar::a:
begin
end;
.
.
end;

or
case myvar of 'a':
begin
.
.
I can't compile any of these eksampels

any ideas

regards

Peter

Comments

  • wonmowonmo Member Posts: 139
    In the first example set the option string values in the properties of the variable and your code should work. For the second try:

    CASE FORMAT(myvar) OF
    'a': BEGIN
    .
    .
    END;
    .
    .
    END;
  • JohnPJohnP Member Posts: 56
    This works for me

    CASE myvar OF
    myvar::A: BEGIN
    END;
    myvar::B: BEGIN
    END;
    myvar::C: BEGIN
    END
    ELSE
    BEGIN
    END;
    END;

    Cheers,

    John
Sign In or Register to comment.