NetTalk Central

Author Topic: c8/nt5.38 Lookups not initiating validate::  (Read 2613 times)

hilton

  • Jr. Member
  • **
  • Posts: 59
    • View Profile
c8/nt5.38 Lookups not initiating validate::
« on: October 25, 2011, 01:43:12 AM »
Hi Folks,

I am probably doing something wrong or missing something. 
1. I have a stock file and a separate file of stockonhand in multiple warehouses.
2. On my order line input form I have product code with a lookup
3. If you enter the product code without using the lookup the validate:: routine is fired which results in obtaining the stock on hand.
4. If you use the lookup, the product code and description arrive with the cursor sitting in the product code field.
5. When you tab off the field, the validate:: routine is not fired which means that the stock on hand does not arrive, or worse you see the stock on hand that has been left over from a previous attempt to get the correct product.
6. I understand that this is probably a manifestation of the js saying "Aha the field has not changed so I will not fire validate::"

The question is - how do I use the lookup AND have the validate:: routine do it's thing.

Thanks,
Hilton.

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11244
    • View Profile
Re: c8/nt5.38 Lookups not initiating validate::
« Reply #1 on: October 25, 2011, 07:48:51 AM »
Are you doing a Page lookup, or a Popup lookup?

My guess is you need to move the code you have in Validate:: into the AfterLookup routine instead.

Cheers
Bruce

hilton

  • Jr. Member
  • **
  • Posts: 59
    • View Profile
Re: c8/nt5.38 Lookups not initiating validate::
« Reply #2 on: October 25, 2011, 03:33:35 PM »
Hello Bruce,

Thank you - I simply put the validatevalue:: where you suggested and it works for both page and popup.

The more one struggles the more one learns.  I must admit it is enjoyable.

Thank you again for your help and being so prompt.

Bye,
Hilton.