Show selected Option in message

GoMaDGoMaD Member Posts: 313
Hi everybody,

A question about text string .....

I want to see in a string the text for the option selected in a field... for instance :
MESSAGE('The option selected is %1',VarRecord.OptionField);
But the Message which appears is 'The option selected is 1'. What is the solution to have the Caption of the option instead of the value ?

I've tried MESSAGE('The option selected is %1',FORMAT(VarRecord.OptionField));
But that didn't help.

I thought the format trick worked in Navision version <=3.70.

Does anybody have a clue?
Now, let's see what we can see.
...
Everybody on-line.
...
Looking good!

Comments

  • remco_rauschremco_rausch Member Posts: 68
    Hi,

    I've tried the following code in a report


    salesheader."document type" := salesheader."document type"::order;
    message(format(salesheader."document type"));

    message('the option selected is %1',salesheader."document type");

    Both gave me the output 'order' rather than the integer value of the field. Where are you trying to display the message because I do recall having and solving this problem.

    Remco
  • GoMaDGoMaD Member Posts: 313
    It's a 4.00 SP2 SQL 2005 environment.

    I'm showing the message on trigger OnPreDataItem of a report.
    Now, let's see what we can see.
    ...
    Everybody on-line.
    ...
    Looking good!
Sign In or Register to comment.