NetTalk Central
NetTalk Web Server => Web Server - Ask For Help => Topic started by: Keith on December 05, 2014, 02:14:07 AM
-
HI
I have been adding Lookups to my app with 100% success. However, I noticed today (after an inadvertent 'double click' of a row in the browse) that I got the error in the attached png.
My selection browse for the lookup is a pop up and has no Form, just an in-line select button. I have checked other lookups and some do not exhibit this behaviour while at least one other one does.
The error refers to the primary key on the Customer File and I am looking up on the 'Pets' file (and Customers have many pets). I suspect that this problem must have something to do with the key and relationship definition but what?
Thanks
Keith
[attachment deleted by admin]
-
What I also meant to ask was - why does 'double-click' have any meaning in this context where there is no Form?
Keith
-
The behavior of a double click is set in
WebServer procedure, Settings tab, Defaults / Browse.
In the case of a lookup, double-click usually translates to "select".
Do some of your lookups use a multi-component "unique" key? Are these the ones that are failing?
Cheers
Bruce
-
Hi Bruce
I am going to document three 'Lookup' cases where 'Double Click' on a row in the Lookup browse causes a problem (or not). All of the browses are just designed for 'selection' only i.e they have an in-line Select button and the Form tab/ Show Buttons sub tabs have no buttons included.
Case 1.
File = Pets
Browse = bPetsSelect
Key = byCustomerPet (two components), unique
Key = byPetName (one component)
Key = byPet (one component) unique, primary
Lookup returns the Pet Name
'Select' works but 'double click' on a row gives error message:
record not found: (-2) Error 30: Entry not found for key Cus:byCustomerNumber
Case 2.
File = Vets
Browse = sVet
Key = byNumber (one component), unique, primary
Key = byName (one component), unique
Lookup returns the Vet Name
'Select' works but 'double click' on a row gives error message:
record not found: (-2) Error 30: Entry not found for key Cus:byCustomerNumber
Case 3.
File = Rooms
Browse = bRoomsSelect
Key = byRoomNumber (one component), unique, primary
Key = byDescription (one component), unique
Lookup returns the Room Number
'Select' works. 'double click' on a row does not act as 'select' but no error message.
For Case 2 (sVet) I changed the byName key to be primary which seems to make it confer to the description in the 'Developing Web Applications with NetTalk' book viz:
"In this context the data is normalized if;
a) the lookup file (eg products) has a single component primary key and
b) the field from that key is used as the value in the related table (eg LineItems)"
but got the same error.
As regards Case 1 the file is keyed by Customer/Pet because I only want to display the Pets that belong to the originally selected Customer (and this works fine). But for the other two cases Customer is not involved in the Lookups - they are stand-alone.
Thanks for your help
Keith
-
Hi Keith,
can you maybe post a dict, app and some data with these layouts showing these configurations?
cheers
Bruce
-
Attached is a modified Web3 app with a menu choice mailbox no buttons.
Double click comes up (in this case) with page cannot be found, although in an app of mine it came up with the error 5 message
[attachment deleted by admin]
-
thanks Keith
-
Bruce
Sorry, The AppDct.zip file that I sent is the wrong one. Could you please delete it from the server.
The attached SlectIt.zip is the one to use - thanks.
Keith
[attachment deleted by admin]
-
Hi Keith,
>> The behavior of a double click is set in WebServer procedure, Settings tab, Defaults / Browse.
>> In the case of a lookup, double-click usually translates to "select".
You have the setting set to
DoubleClick Row To Form
It should be
DoubleClick Select when Selecting
then the double click will select the record.
cheers
Bruce
-
Thanks Bruce - I understand this now but it wasn't clear at all when I read the documentation before starting this thread.
The Template Reference only describes one of the options viz: 'If this is on (Double-click row to Form) the user can double-click on a browse row to open the form' and you can't see all of the text of the option for 'Selecting' in the drop down box.
Also, I thought that if the default action (row to form) was changed then all of the legitimate double clicks on browse rows would not work. I see now that 'double click row to form' is still the default even when you opt for 'DoubleClick Select when Selecting'.
But all good now.
Can you delete AppDct.zip off the server?
Cheers
Keith