NetTalk Central

Author Topic: Calling and reading a value from a Lookup within a Form  (Read 3205 times)

Devan

  • Full Member
  • ***
  • Posts: 230
    • View Profile
    • Email
Calling and reading a value from a Lookup within a Form
« on: April 17, 2012, 03:43:17 AM »
Ok, I've been playing with using EIP on a WebBrowse for the past few days, and from previous messages here, there has always been a limitation with ADDING a new record to a browse, understandably.

What I was thinking was - I have a fairly simple Browse which asks for the Product Code and Quantity.  Both of these are EIP fields and work well when modifying/deleting the data.

I thought for ADDING a new row, what I would try and do is to have a button that simply said 'Add New Product' which would call a normal Product Lookup screen, and when the user chose a product, I could manually add a new row to the data table with the selected product code, and refresh the Browse so that it was back in 'edit mode' so the user could change the Quantity etc.

I am unclear as to how to best capture the returned data from the Lookup procedure.  I tried putting some code in the 'AfterLookups' routine in the Form, but it never seems to get called.  I presume I am calling the Lookup wrong.  I have the following Javascript code on the 'Add Product' button:

Code: [Select]
ntd.push('LookupProducts','SDT__ProductCode','Product For Standing Order Template',1,6,'VPR:Description','UpdateDBStdOrdDtl')
But it is not triggering the 'AfterLookups' routine so I think I have one of the parameters wrong?

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: Calling and reading a value from a Lookup within a Form
« Reply #1 on: April 17, 2012, 04:02:48 AM »
Devan,

I think best to post a small example we can work on together to see if we can achieve what you're looking for.

cheers
Bruce