Auto Complete

Navision Financials Version 2.01B I have a text field which has the “TableRelation” set to a field in another table. The “ValidateTableRelation” is set to “Yes” since I only want the user to select a value from the other table. Fairly standard stuff. The values in the other table include: … Pharmaceuticals Property PR Recruitment … When a user enters PR in the field, or selects PR from the lookup form, Navision immediately replaces it with Property. This is obviously highly hilarious the first time it happens, but when you realise there is no way of selecting PR it becomes less funny, and after 6 or 7 attempts it becomes slightly irritating. For now I have changed PR to P.R. which has solved the problem, but it would be nice not to have to design the business data around system flaws. Any ideas? Paul.

Put the PR value before the Property value. That way, your user can enter ‘pr’ when they want PR and if they want Property, they type ‘pro’. Of course this can only be done if this is a brand new field. If you change this in an existing database with many values, you need to change existing records too.

Thanks, but the field is part of the primary key and so is sorted alphabetically by Navision itself - I have no control over the sorting order (without adding another field further up the key, which is a bit dramatic). I think the problem arises because of the way lower-case and upper-case are sorted by Navision. If I had Pr & Property it would be OK, but I don’t.

oh right, I thought you were talking about an option field. I’d probably do it by having a code and a description field in the related table, with a lookup flowfield into the description. That way you can manipulate the codes somewhat (code PR for PR, code PT for Property or something)

Thanks.

You can circumvent this behaviour by adding the following code to the form:OnAfterInput(VAR Text : Text[1024];) MyTxt := Text; OnValidate() VALIDATE(MyField, MyTxt);The normal Navision behaviour will be overruled this way - which of course has it’s downsides too [;)] Strangely enough the problem doesn’t seem to be there if you apply filters to the field - Oh well, another Navision quirk we have to live with [8D] - lesson learned: never use textfields as primary keys…

Thanks for everyone…My was making it as a very big issue

Thanks to everyone…