Okay, I’ve searched the forum, followed the help documentation and can only conclude that I’m suffering from late-in-the-day stupidity… I want to use Format to return the text value of an option, so… ERROR(Text001,FORMAT(OptionField::OptionValue),0,’’); OR perhaps ERROR(Text001,FORMAT(OptionField::OptionValue),0,0); - the online help insists that 0 is for the text value and 1 is for the numeric value. I’m sure I’ve done this a thousand times before?? But no joy - I get the numeric value every time. I’ve fiddled with the last value but can’t get a different result.
Hi KB I had the same problem the other day and not wanting to spend too much time on it I did: DummyRec.OptionField := DummyRec.OptionField::OptionValue; ERROR(Text001,DummyRec.OptionField,0,'<Text>');
It’s a crap solution but it does the trick. Stebbi (The Oracle is still with you KB[:D])
OptionField := OptionField::OptonValue; Error(Text001, FORMAT(OptionField));
You don’t need the extended FORMAT parameters, then.
Thanks Stebbi! I hope those young upstarts Akers and Alex are giving you the respect you derserve? Right - I got confused. The purpose of the dummy rec is so can format the optionvalue without having to mention the specific value in the Format statement. And thanks Joerg - this method does seem to remove the need for the extended paramters.
it’s not even necessary to use FORMAT at all, simply assign the Option value before the error statement and then use Error(Text001, OptionField); This will do… Saludos Nils
quote:
Originally posted by stebbijons
DummyRec.OptionField := DummyRec.OptionField::OptionValue; ERROR(Text001,DummyRec.OptionField,0,'<Text>');
It’s a crap solution but it does the trick.
Crap solution, possibly - but the only one!