* character in a text box with sourcexper of text

I’ve got a text box that in has a source expression of a text variable. If a type in an expression with the last character a ‘’ then this character is trimmed of the end of the varaible when I tab off the control. If the text box has a source expression that is a field that the '’ is retained. I assume this is beacuse Navision is treating it as a wild card. Does anyone have any bright ideas how to get around this - I know there is probably an obvious answer but in my defence it is late on a Friday afternoon [;)]

This works OK for me, can you clarify a bit? ALso what version?

David, Thanks for the response. This is with Navision V3.6 (Fully patched with hotfixes). I have just tested this with v4 and I can’t reproduce the error with this version and all works as expected. Sorry - should have tested this before the orginal posting [Duh!] However with 3.6 I have a global defined as text 10. I have a form with a text box with the Source Expression set to the text variable. If I type A* into the field when I move off the field this gets truncated to A. If I type AA then the correct value gets retained. A also gets truncated to A. Its as if Navision is treating the '’ as a wildcard thus removing it if it is the first or last character, but in my case it is a valid character and I want it retained. The same happens if I define the field as type Code. If the source expression is a field in a table of type text 10 the A gets written correctly.

And there is for sure no C/AL in OnValidate or OnAfterValidate of this Text-Box?

Joerg, No code at all in the triggers. I created a brand new form with just a text box on to test as I thought I was going mad…

Hmmm … that’s REALLY strange … Well, when you insert a value, the function MakeText(Text) in Codeunit 1 is triggered; if you run the debugger while inserting a value with *, could you see anything strange … maybe there’s something changed in MakeText ? Just guessing …

FYI I was testing in 3.70

The easiest way to get around this: define a global var in the form of the type record and set the temporary flag on that var. select any table where the user will have access and where you find a field of the right type with no triggers. use this field instead as your source expression in the form “rec.field”.

Thomas Thanks for the response - I had already done this as a workaround and it works fine. I’ll just file this one under strange undocumented feature [:D]