How to print % symbol in confirm message?

sergio_navsergio_nav Member Posts: 17
Hi,

I'm trying print % symbol in text constant but I have some problems..

This is my C/AL code:

IF CONFIRM(TextConstant) THEN BEGIN
...
END;

And this is the TextConstant value:

Do you want to record the invoice with 21% VAT?

But, when the message is showing in the screen, I can see this text:

Do you want to record the invoice with 21 VAT?

Evidently, the problem is the percentaje symbol because NAV used to works with variables... then, how can I print this character in confirm message?

I was read this post http://dynamicsuser.net/forums/p/10716/54112.aspx but not help me...

Thanks in advance for our help
Sergio

Comments

  • MBergerMBerger Member Posts: 413
    Bit of a pragmatic, quick workaround :
    make your textconstant : "Do you want to record the invoice with 21%1 VAT?"
    then
    if CONFIRM(strsubstno(TextConstant,'%')) then begin
    
  • sergio_navsergio_nav Member Posts: 17
    Hi MBerger

    Thanks for your help but, the solution you proposed is not valid... :(

    I checked the code and is valid (works with other characters) but not with % symbol...

    Any idea?

    Thanks!
    Sergio
  • navuser1navuser1 Member Posts: 1,329
    Try with this.

    Ch :='%'; // Ch is Char in Data type
    Now or Never
  • MBergerMBerger Member Posts: 413
    sergio_nav wrote:
    I checked the code and is valid (works with other characters) but not with % symbol...
    My apology, i tried it out with MESSAGE, not CONFIRM.
Sign In or Register to comment.