how to take caption of the option

AmaraaAmaraa Member Posts: 153
Hello,

Sorry for the such asking.
But how can I take caption of the option.


FORMAT("Document Type") = caption (....)
FORMAT("Document Type"::Payment) = value (1)

I need to take something fixed like in 2nd case. But it doesn't give me a work instead it is giving me a number.

Any help appreciated,
Amaraa

Answers

  • BeliasBelias Member Posts: 2,998
    FORMAT("Document Type") = caption (....)
    FORMAT("Document Type"::Payment) = value (1)
    
    this code you wrote clearly does not compile...what do you really want to do?
    obtain the caption of a certain option?
    Mytextvariable := format("Document type"::payment)
    Mytextvariable := format("Document type"::"1")
    
    -Mirko-
    "Never memorize what you can easily find in a book".....Or Mibuso
    My Blog
  • krikikriki Member, Moderator Posts: 9,110
    Create a new variable (I presume you are using T36:"Sales Header") and assign the option to it, and then print it:
    recSalesHeader."Document Type" := rec."Document Type"::"Order";
    txtText := FORMAT(recSalesHeader."Document Type");
    MESSAGE('%1',txtText);
    
    Regards,Alain Krikilion
    No PM,please use the forum. || May the <SOLVED>-attribute be in your title!


  • AmaraaAmaraa Member Posts: 153
    kriki wrote:
    Create a new variable (I presume you are using T36:"Sales Header") and assign the option to it, and then print it:
    recSalesHeader."Document Type" := rec."Document Type"::"Order";
    txtText := FORMAT(recSalesHeader."Document Type");
    MESSAGE('%1',txtText);
    
    Thanks kriki!
Sign In or Register to comment.