NetTalk Central

Author Topic: Unique key  (Read 3442 times)

Rene Simons

  • Hero Member
  • *****
  • Posts: 650
    • View Profile
Unique key
« on: November 01, 2011, 05:55:24 AM »
Hi,

I'm almost ashamed to ask but I have a table with a unique unchanging key which consists of only one field (!).
I fill in this key in the template for the browse.
In the Set Queue Record Embed, I want to use the key field to do some lookups to markup the name in the browse. The result of the markup is put in a local var, which is shown in the browse.

To my surprise all the markup names in the browse were blank as a result of the fact that the keyfield is blank (I checked the key field itself ) in the generate browse (or so) routine.
I was under the impression that the keyfield of the unique unchanging key is IN the browse. But I guess I'm wrong?!?!

Cheers,
Rene
Rene Simons
NT14.14

peterH

  • Sr. Member
  • ****
  • Posts: 413
    • View Profile
Re: Unique key
« Reply #1 on: November 01, 2011, 06:57:08 AM »
Add the key field as a hot field in the NetWebBrowse procedure.

Peter

peterH

  • Sr. Member
  • ****
  • Posts: 413
    • View Profile
Re: Unique key
« Reply #2 on: November 01, 2011, 07:07:09 AM »
Just went and checked one of my procs. The key _is_ in the view so maybe you're using a wrong embed for the lookups? Should go in "3 Inside Browse Loop" - "2 Set Queue Record".

Peter

Rene Simons

  • Hero Member
  • *****
  • Posts: 650
    • View Profile
Re: Unique key
« Reply #3 on: November 02, 2011, 09:43:26 AM »
Hi Peter,

Thanks for the advice.
I figured it out:

The procedure I use to markup the name was to blame.
What went wrong was  that I assigned the value of the parameter to the keyfield BEFORE i did a "do OpenFiles"
This caused the keyfield to be nullyfied.

I Moved the assignment after the "do OpenFiles" and everything works fine now.

Thanks,
Rene
Rene Simons
NT14.14