NetTalk Central

Author Topic: Locators  (Read 2910 times)

capora56

  • Newbie
  • *
  • Posts: 12
    • View Profile
    • Email
Locators
« on: February 20, 2015, 03:08:03 AM »
Hi all
Two questions

1º Is possible to customize the locator prompt ?

2º This locator is over a string(10) field (NroArticulo). The contents of that filed in the database is completed with leading zeros, for example the Nro = 19600 is saved in the database as 0000019600.
Is posible in the locator enter 19600 and it automplete with leading 0s for doing the search ?

Thank you very much

Ruben Caporossi

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: Locators
« Reply #1 on: February 20, 2015, 05:57:23 AM »
Hi Ruben,

>> 1º Is possible to customize the locator prompt ?

yes, WebServer procedure, Extensions / Settings / Advanced tab.

>> Is posible in the locator enter 19600 and it automplete with leading 0s for doing the search ?

yes, use a "contains" locator type instead of a positional locator.

cheers
Bruce

capora56

  • Newbie
  • *
  • Posts: 12
    • View Profile
    • Email
Re: Locators
« Reply #2 on: February 20, 2015, 06:43:17 AM »
Thanks Bruce for your response

1º yes I knew what you say to customize the locator prompt in the settings of the server procedure  but when I do this my text is added to the text that appear when I select the locator column, and the problem is if i have various locators in the app, i woud like to customize each one individually. For example :

This is how i see the prompt after customization :

Nº Artículo/Cód Barras : Nº Artículo:

Nº Artículo/Cód Barras : my customization
Nº Artículo : Added when i select the locator field, its the same as the column heading

If i hide the prompt locator all disappear.

2º  the idea that i have in mind is that when i enter 19600 and  the searh begins it refresh the locator content  to 0000019600, using contains as you say it works fine but don't complete the locator content as i would like

Thank you very much

Ruben


Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: Locators
« Reply #3 on: February 23, 2015, 12:16:42 AM »
>>  the idea that i have in mind is that when i enter 19600 and  the search begins it refresh the locator content  to 0000019600, using contains as you say it works fine but don't complete the locator content as i would like

A locator doesn't access the file to find out if it's right or not. So it's not going to change because there's no way for it to know that you're trying to "exact match" a record.

It sounds to me like what you want to use is an Entry field, with a Auto-Complete set. You could easily create a form, with such a field, and a browse, and then use the entry field to filter the browse. Let me know if you need tips for this.

Regarding customised Locator text - your best bet is to right-click / source then search for the calls to CreateLocator, and in the embed before that set loc:SortHeader. Not there may be more than one place where CreateLocator is called, depending on your locator settings.

cheers
Bruce






Cheers
Bruce