How is it possible to store a % as such in a text constant, without Navision trying to replace it ?
Use a double % sign such as “The correctness this entry is 100%%.”
But if I use the textconstant with STRSUBSTNO this doesn’t work.
quote:
Originally posted by bs602327
But if I use the textconstant with STRSUBSTNO this doesn’t work.
Untested but try: Use %1 and %2 in your textConstant them pass in the ‘%’ Text101 = The percentage value for %1%2 MESSAGE(Text101,STRSUBSTNO(‘Fresh Fish = %1’,10),‘%’); Tested and it works!! [:D]
I’ve tried that already, but no effect… There must be a way to include a %, well, I hope so [?]
a workaround, but it works: text constant: Name txt001, ConstValue “test 100%1.” message(txt001, ‘%’);
That works indeed, and it’s a good solution for my problem. But still, doesn’t anybody know a solution with STRSUBSTNO ? Or is it the combination of MESSAGE(STRSUBSTNO(Textc)) that causes the damage ?
quote:
Originally posted by bs602327
That works indeed, and it’s a good solution for my problem. But still, doesn’t anybody know a solution with STRSUBSTNO ? Or is it the combination of MESSAGE(STRSUBSTNO(Textc)) that causes the damage ?
Can you paste your code, why are you using STRSUBNO ?
Try this: Name ConstValue MyTxt The VAT % is %1 % MESSAGE(MyTxt, '25'); MESSAGE('%1', STRSUBSTNO(MyTxt, '25'));
Good solution, sv ! So MESSAGE just replaces (or clears) all %'s it finds, pretty weird, but then again, it’s Navision [:)]
quote:
Originally posted by Steffen Voel
Try this:Name ConstValue MyTxt The VAT % is %1 % MESSAGE(MyTxt, '25'); MESSAGE('%1', STRSUBSTNO(MyTxt, '25'));
This works without the STRSUBSTNO MtTxt = The VAT %2 is %1 %2 MESSAGE(MtTxt, ‘25’,‘%’);