How to format option field as text

arcull
arcull Member Posts: 191
Hi everyone. Anyone knows how to format option field as text when using field reference? I tried
FORMAT(FieldR.VALUE,0,'<Text>')
but it doesn't work. Any suggestion welcome, thanks

Comments

  • JPHSC
    JPHSC Member Posts: 67
    i did it like this



    TextFieldType := FORMAT(FieldRef.TYPE);
    IF TextFieldType = 'Option' THEN BEGIN
    Text := FieldRef.OPTIONCAPTION;
    EVALUATE(i, FORMAT(FieldRef.VALUE));
    lintOption := i + 1;
    Text := SELECTSTR(lintOption, Text);
    END ELSE
    lText := FORMAT(FieldRef.VALUE);
  • arcull
    arcull Member Posts: 191
    Thanks a lot for the solution :)