NetTalk Central
NetTalk Web Server => Web Server - Ask For Help => Topic started by: bergsj on May 24, 2010, 11:50:52 PM
-
Hi there,
I'm using the lookup function which has a new feature called 'Display description instead of value'. This works great if you have a lookup table with an ID field in the Value field of the template and a nice description field in the Description field of the template.
In my case I do not use the ID field as the value field but only the Description field. When I select the record and press Select, the description is not shown.
This only works when I use the ID as the value field.
Is this by design or maybe a bug I am facing?
Any help would be appreciated.
-
OK let's narrow things down. This is because the lookup browse is using the Unique Key with ID as it's field. When adding a new Key in the DCT on the description field a specifying that in the browse it is working. However this is not a unique key so this is not a solution.
-
Hi Sjoerd,
Ok, I think I understand your situation - but let me see if I have it right.
You have a table (say "customers") which you are doing a lookup on. the customers table has a primary ket (some sort of Id) but what you're really interested in is the customer name.
Now you have a table (invoices) which will do a lookup on customers. You will get the customer name (not the id) and store this in the invoices record. However the customer name is _not unique_ (and hence the key on cusotmer name is not unique)?
Have I got it right?
Bruce
-
Bruce, that's correct in your example I want to save the customername in the invoice record, not the ID. In that case it is not working.
-
Hi Sjoerd,
Try adding the assignment to the "More Assignments" list.
ie set up the lookup as-if you were gonna store the unique code part. So value = Id, Desc = Name and so on.
Then in the more assignments part set the Inv:Customer = Cus:Name.
(I'm intrigued that you're storing a non-unique part of a lookup record, but that's not really material to the answer.)
cheers
Bruce
-
Thanks Bruce,
Seems to work like a charm. I'm not able to actually save the record, but as soon as I'm done I will test if the non-unique value (it's a postal code for anonymous logging of request) is saved in the record and not the ID value.
Regards,
Sjoerd