NetTalk Central

Author Topic: Error ASSERT Unique/primary mey required on table F_Fdlr:F_Dealer_Type Field as  (Read 2988 times)

rjolda

  • Sr. Member
  • ****
  • Posts: 329
    • View Profile
    • Email
Hi,
NT 14.01
Why am I getting ASSERT errors on tables used for Lookups?  Telling me that I need a Unique/primary key on F_DEALER_TYPE field as a single or last component.  I have one defined in my dictionary:

TABLE:

IHID            LONG
DLR_Type        STRING(50) !type of dealer name
DLTTYPE_Other1  CSTRING(20)
DLTTYPE_Other2  CSTRING(20)
DLTTYPE_Info    CSTRING(1000)

KEYS:
IHID_KEY        KEY(DT:IHID),PRIMARY,NOCASE
TYPE_NAME       KEY(DT:DLR_Type),NOCASE

What am I Missing?
Thanks,
Ron


Rene Simons

  • Hero Member
  • *****
  • Posts: 650
    • View Profile
Hi Ron,

When you use a field for lookup, and you want to show the description i.s.o. the code,
there must be a unique key on the description in order for the program to use the description to do a successful lookup in the table.

Cheers,
Ren?
Rene Simons
NT14.14

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Hi Ron,

What Rene said. Just to be clear,

>> TYPE_NAME       KEY(DT:DLR_Type),NOCASE

Make this key Unique.

cheers
Bruce

rjolda

  • Sr. Member
  • ****
  • Posts: 329
    • View Profile
    • Email
HI,
Found that I had set up the wrong field in the Lookup form.  Fixed that and the problem went away!
Thanks
Ron