NetTalk Central

Author Topic: Display Description instead of Value  (Read 4620 times)

Thys

  • Sr. Member
  • ****
  • Posts: 311
    • View Profile
    • Incasu
    • Email
Display Description instead of Value
« on: June 14, 2016, 05:45:42 AM »
Hi,

On my Location update form, I have a lookup to the Country table. When I have "Display Description instead of Value" switched on in the Country id field on the Location form, it shows the Country name - but when it saves SQL complains that the Country id was not found. When it's switched off (thus the Country id is shown in the Location form and not the Country name), then SQL doesn't complain.

In general for lookup fields, do I need to have a separate field for the lookup description? In a desktop app this will definitely be needed. But why the option then of "Display Description instead of Value"?

Thanks,
Thys

bijan

  • Jr. Member
  • **
  • Posts: 55
    • View Profile
    • Email
Re: Display Description instead of Value
« Reply #1 on: June 14, 2016, 11:38:44 AM »
Hi Thys,

Can you show us your Lookup settings tab. I am doing this in a form and a browse(drop down) and it works fine. I am using tps.

Bijan
« Last Edit: June 14, 2016, 11:44:15 AM by bijan »

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: Display Description instead of Value
« Reply #2 on: June 15, 2016, 03:14:43 AM »
if you are doing "display description instead of value" then your lookup table needs a single component key on the description field.
(of course it needs a single-component key on the value field as well.)

cheers
Bruce

Thys

  • Sr. Member
  • ****
  • Posts: 311
    • View Profile
    • Incasu
    • Email
Re: Display Description instead of Value
« Reply #3 on: July 25, 2016, 04:36:13 AM »
Hi Bruce.

Back from leave now. Just installed NT 9.12.

I'm doing a lookup from the Location form to the Country browse. Both tables have a column GUID which is CHAR(16) in SQL as a single-component PK. Attached is a doc with the screenshots, also showing the SQL error.

Thanks,
Thys

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: Display Description instead of Value
« Reply #4 on: July 27, 2016, 03:49:17 AM »
>> if you are doing "display description instead of value" then your lookup table needs a single component key on the description field.
(of course it needs a single-component key on the value field as well.)

Is there a (preferably unique), single component key, on COU:Name?

cheers
Bruce

Thys

  • Sr. Member
  • ****
  • Posts: 311
    • View Profile
    • Incasu
    • Email
Re: Display Description instead of Value
« Reply #5 on: July 27, 2016, 04:47:34 AM »
No, I don't have a key on the description value. I'll add the key to try it.

Thanks