Auto Fill

Is there a way in Navi 3.60 to have for example the customer number to Auto Fill the rest of the code as soon as it is unique? So let’s say you are entering a customer number 123456. As soon as you entered 123, the system realizes that there is only one customer that starts with 123 and then fills in the rest for you.

It’s called search using find as you type and setting to find on the beginning of the value… Regards,

Hello, I guess the auto-fill that he needs should wokr without opening the customer list form and without performing the “search”… I agree, that this just requieres two keystrokes more (F6 and Enter), but I also encountered many users that simply want to start typing the customer nr in the invoice form… There is no built-in funcionality, but you could add the following code in the related forms, in the OnAfterInput trigger of the respective fields (sorry for some references in spanish…) IF NOT Customer.GET(Text) THEN BEGIN Customer.SETFILTER("Nº",Text + '*'); IF Customer.COUNT = 1 THEN BEGIN Customer.FIND('-'); Text := Customer."Nº"; END ELSE IF FORM.RUNMODAL(FORM::"Lista de clientes",Customer,Customer."Nº") = ACTION::LookupOK THEN Text := Customer."Nº" END; Hope this helps. Nils

Hi Nils, Yes, you are right about the requirement - without opening the search window. Will try your code. Thanks much, Ed

quote:


Originally posted by nilsm
Hello, I guess the auto-fill that he needs should wokr without opening the customer list form and without performing the “search”… I agree, that this just requieres two keystrokes more (F6 and Enter), but I also encountered many users that simply want to start typing the customer nr in the invoice form… There is no built-in funcionality, but you could add the following code in the related forms, in the OnAfterInput trigger of the respective fields (sorry for some references in spanish…) IF NOT Customer.GET(Text) THEN BEGIN Customer.SETFILTER("Nº",Text + '*'); IF Customer.COUNT = 1 THEN BEGIN Customer.FIND('-'); Text := Customer."Nº"; END ELSE IF FORM.RUNMODAL(FORM::"Lista de clientes",Customer,Customer."Nº") = ACTION::LookupOK THEN Text := Customer."Nº" END; Hope this helps. Nils


You could also try this one. In the Customer Table, Go to the properties of the Customer Number Field. Change the AltSearchField property to ‘Customer Number’ instead of ‘Search Name’. Then as soon as you type 123 and press enter, 12345 will automatically come. I hope this Helps.

Hi Nils, We tried but it did not work. Auto-fill as you can use with Access or Foxpro, checks for every character that you enter, and as soon as it finds a unique record it fills in the rest of the characters before you move to the next field. Regards, Ed

Hello Ed Nils solution should work. (Try it without ‘*’) We have a similar way to get item numbers with the search name. The user fills the search name in the number field of a sales order. Then he has to press ENTER. If the system find a unique record it fills all other fields. If not - a window will appear with all items filtered by the input. There should be another thread regarding autofill in this forum. (I just found this thread. It is from the german forum: http://www.navision.net/forum/topic.asp?TOPIC_ID=4838 ) bye Andre

In my opinion there is no way to create a autofill function in a field - trigger. The code should be placed in onimputchange, but there is no way to: * get the actual text of your imput (in onimputchange) * and manipulate the position of your cursor Maybe there is a possibility creating a subform with: * sourcetablerecord of the table in which you want to serach * only one field assigned to the field you want to search * setting this subform to not editable If you link this subform in your mainform, “editable = no” then you can click on this field an write the “search-string”. The search- window will open automatically and the first hit will be shown in the subform-field. I have never tested this “crazy” idea, because it’s easier to train your Users on “F6 + Strg F” and wait until autofill will be a feature of a new client. Bye (Stefan);

Hi Ed Sorry for misleading you (to the german thread). In this thread we found out that Navision will need an event to set a filter or search a record. Therefore you will need an Enter or a Changefield or something similar to solve your problem. bye Andre