NetTalk Central

Author Topic: Lookup generating error on Double Click  (Read 6142 times)

Keith

  • Sr. Member
  • ****
  • Posts: 306
    • View Profile
    • Email
Lookup generating error on Double Click
« 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]
Clarion 10.0.0 build 12799
NetTalk 9.31
StringTheory 2.65
InsightGraphing 2.27

Keith

  • Sr. Member
  • ****
  • Posts: 306
    • View Profile
    • Email
Re: Lookup generating error on Double Click
« Reply #1 on: December 06, 2014, 11:53:53 PM »
What I also meant to ask was - why does 'double-click' have any meaning in this context where there is no Form?

Keith
Clarion 10.0.0 build 12799
NetTalk 9.31
StringTheory 2.65
InsightGraphing 2.27

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: Lookup generating error on Double Click
« Reply #2 on: December 07, 2014, 09:44:18 PM »
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

Keith

  • Sr. Member
  • ****
  • Posts: 306
    • View Profile
    • Email
Re: Lookup generating error on Double Click
« Reply #3 on: December 09, 2014, 12:43:53 AM »
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
Clarion 10.0.0 build 12799
NetTalk 9.31
StringTheory 2.65
InsightGraphing 2.27

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: Lookup generating error on Double Click
« Reply #4 on: December 09, 2014, 07:29:17 AM »
Hi Keith,

can you maybe post a dict, app and some data with these layouts showing these configurations?

cheers
Bruce

terryd

  • Hero Member
  • *****
  • Posts: 759
    • View Profile
    • Davcomm
    • Email
Re: Lookup generating error on Double Click
« Reply #5 on: December 09, 2014, 09:13:00 AM »
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]
Terry Davidson
Windows 10 64 bit/Windows7 64bit
Clarion 9.1.11529/Clarion10 12567
Nettalk 913
Nettalk 1015
StringTheory267/Winevent515/XFiles298/MessageBox239/Cryptonite186

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: Lookup generating error on Double Click
« Reply #6 on: December 09, 2014, 10:04:58 PM »
thanks Keith

Keith

  • Sr. Member
  • ****
  • Posts: 306
    • View Profile
    • Email
Re: Lookup generating error on Double Click
« Reply #7 on: December 11, 2014, 02:20:20 AM »
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]
Clarion 10.0.0 build 12799
NetTalk 9.31
StringTheory 2.65
InsightGraphing 2.27

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: Lookup generating error on Double Click
« Reply #8 on: December 11, 2014, 11:31:58 PM »
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

Keith

  • Sr. Member
  • ****
  • Posts: 306
    • View Profile
    • Email
Re: Lookup generating error on Double Click
« Reply #9 on: December 12, 2014, 12:06:58 PM »
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
Clarion 10.0.0 build 12799
NetTalk 9.31
StringTheory 2.65
InsightGraphing 2.27