NetTalk Central

NetTalk Web Server => Web Server - Ask For Help => Topic started by: rjolda on August 22, 2023, 01:47:33 AM

Title: Error ASSERT Unique/primary mey required on table F_Fdlr:F_Dealer_Type Field as
Post by: rjolda on August 22, 2023, 01:47:33 AM
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

Title: Re: Error ASSERT Unique/primary mey required on table F_Fdlr:F_Dealer_Type Field as
Post by: Rene Simons on August 22, 2023, 02:09:06 AM
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?
Title: Re: Error ASSERT Unique/primary mey required on table F_Fdlr:F_Dealer_Type Field as
Post by: Bruce on August 22, 2023, 02:16:55 AM
Hi Ron,

What Rene said. Just to be clear,

>> TYPE_NAME       KEY(DT:DLR_Type),NOCASE

Make this key Unique.

cheers
Bruce
Title: Re: Error ASSERT Unique/primary mey required on table F_Fdlr:F_Dealer_Type Field as
Post by: rjolda on August 22, 2023, 05:10:01 AM
HI,
Found that I had set up the wrong field in the Lookup form.  Fixed that and the problem went away!
Thanks
Ron