NetTalk Central

Author Topic: Embed point after lookup in nt7.37  (Read 2561 times)

hkalmbach

  • Jr. Member
  • **
  • Posts: 81
    • View Profile
    • Email
Embed point after lookup in nt7.37
« on: March 22, 2014, 03:04:31 AM »
Hello,

I just tried to change form nettalk6 to nettalk7 and have a problem.

I have a entry field called WAF:Inventarnummer with a lookup button.
In the field properties I activated the field ‚Send new value to server’.
Additionally I added source code for the server, see attached image.

The code looks like the following:

IF ~LEN(CLIP(WAF:InventarNummer)) THEN
  p_web.SSV('AktMaschSysPk',0)
ELSE
  SYS:Inventarnummer = WAF:Inventarnummer
  GET(Systeme,SYS:KeyInventarnummer
  p_web.SSV('AktMaschSysPk',SYS:SysPk)
END
 
The session variables I need for further selections depending on the value of the field.
This worked very good with nettalk 6.
Now the server does not longer pass this embed point!  I build in a message, but nothing happens, my session variables are not set.

Does someone now what has changed. How can I do things after selecting a record for the fieled WAF:Inventarnummer.

 Thanks in advance

Heinz



[attachment deleted by admin]

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: Embed point after lookup in nt7.37
« Reply #1 on: March 24, 2014, 01:16:16 AM »
 fortunately, the code is still compatible with NetTalk 7. There's no fundamental change there.

So there's something else in play here which is causing the code to struggle.

what differences there are are documented in the upgrade doc;

see http://www.capesoft.com/docs/NetTalk8/nettalkindex.htm

 

>> In the moment my biggest problem is, that some embed source points do not work any longer.

One example:

I have a entry field called WAF:Inventarnummer with a lookup button. In the field properties I activated the field ‚Send new value to server’.

Additionally I added source code for the server:

 

>> This code looks like the following:

 

IF ~LEN(CLIP(WAF:InventarNummer)) THEN

  p_web.SSV('AktMaschSysPk',0)

ELSE

  DO GetStrukturPfadAuftrag

END

 

>> In the routine GetStrukturpfad I set some session variables for further selections depending on the value of the field.

 

the way I usually debug this is to start at the beginning, and follow it through to the point where it "breaks".

 

a) you should see a request appear in the LOG as you tab off the entry field

b) I then turn on the "show stage" debug option in the form, and watch the output in debugview.

there should be a stage "Net:Web:Div" – which calls the CallDiv routine.

c) Then from there it goes to the validate::fieldname routine.

 

The most likely cause is that on the Validation tab of the Form itself, Immediate Validation is set to NO. That prevents the

request in part (a) and naturally it follows none of the rest of the code runs.

Cheers
Bruce