NetTalk Central

Author Topic: Lookup problem in 7.12  (Read 4273 times)

CaseyR

  • Sr. Member
  • ****
  • Posts: 448
    • View Profile
    • Email
Lookup problem in 7.12
« on: June 26, 2013, 06:06:21 PM »
Having a problem with my lookups since updating to 7.12 from 7.07.  It seems others are too but I haven't seen this situation described so..

The lookup is on a memory form.  The form field is the label of an entity that the user sees and selects.  There is a corresponding ID for the entity.  The lookup calls a single purpose Browse that displays the filtered list of entity labels to user for selection.  The key used in the Browse data/tables has two components with the primary component fixed in the filter.  There is a hot (now view) field containing the entity ID.  The entity ID is listed in 'More assingments'.  The entity label is used as the Order, Value, and Description entries in the Lookup settings.   This all worked before.  DebugView gives a 'More than one component in key' message.

The problem appears to be that the loc:lookupdone is always 0 so the entity ID is never assigned in the After Lookup routine.  I have tried a lot of things to fix the problem including removing the Description and Order entries.  'Force user to use lookup' on and off, autocomplete on and off.

I have also tried using the entity ID as the form field with the entity label as the Description entry and 'Display Description instead of Value' turned on.   That works for the lookup itself, but at some point the label is set as the sessionvalue for the ID which causes all sorts of other problems with the memory form.     

Don't know if it is related but both the default header for the Browse and Lookup title for the browse as a popup are not showing.
 
Any suggestions for dealing with this issue?

Thank you.


     

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: Lookup problem in 7.12
« Reply #1 on: June 26, 2013, 09:03:57 PM »
Hi Casey,

As a rule of thumb, anything that takes this long to describe is going to get a request from me for an example.
I'm not sure I even follow your description 100%, but even if I did I suspect my chance of re-creating the problem is near zero.
Perhaps you can duplicate in a shipping example, or perhaps post a small example of the effect here?

update: I've come across a problem in 7.12 (fixed in 7.13) which can best be described as "Lookups on a Popup are not working". If that's what you might describe it as, then it's likely fixed in 7.13.

cheers
Bruce
« Last Edit: June 27, 2013, 12:05:11 AM by Bruce »

CaseyR

  • Sr. Member
  • ****
  • Posts: 448
    • View Profile
    • Email
Re: Lookup problem in 7.12
« Reply #2 on: June 27, 2013, 08:58:42 PM »
Hi, Bruce

I am pretty sure the problem is in the multi component key used in the lookup table.  I checked out some of the shipping examples for a similar table without success, so I modified the dictionary, app and data files of the Browse in Form (21) example to demonstrate the issue.

 I created a TEST table that has a unique ID, an non-unique Name field and a non-unique Org field.   The multicomponent OrgName key is unique.  The Test ID key has a one to many relation with the INVOICE table.   There is a BrowseTest procedure to select by Test Name.  The Update Invoice form and the INVOICE table have been amended to show that both approaches to lookup, displaying Description field instead of Value,  or additional assignments, fail using a multi-component key.   The display Description appears to work at first glance, but the Value is not saved.
 
 Hope the problem is something simple I just didn't understand.

[attachment deleted by admin]

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: Lookup problem in 7.12
« Reply #3 on: June 27, 2013, 11:47:00 PM »
Hi Casey,

I'm not sure if the example accurately reflects your real dictionary, but this isn't a multi-key lookup.
In the example, your Test file has a unique key (Tes:Id) and this is linked to a single field (Inv:Test) in the Invoices table.
So it would make sense to simply do the "more assignments" from this lookup.

If there is your setup, then I guess just do the lookup on ID, and make the Name the more assignments.

I suspect though what you want is to add 2 fields to the Invoice table, which then match 2 fields in the Test table. For example;
Inv:TestOrg
Inv:TestName
which match
Tes:Org
Tes:Name

And then the lookup on the UpdateInvoices table is really populating both the Inv:TestOrg and the Inv:TestName fields. Right?

cheers
Bruce


CaseyR

  • Sr. Member
  • ****
  • Posts: 448
    • View Profile
    • Email
Re: Lookup problem in 7.12
« Reply #4 on: June 30, 2013, 04:41:09 PM »
Thanks for looking at it, Bruce

I may have muddied the issue by putting both approaches to retrieving an ID number and displaying a label on the same example  form.   The objective is to display the description on the form but also retrieve the ID.  The description field is part of a multi-component key (rather than a multi-key lookup).  Using the single value ID key for the lookup browse doesn't change any of the problem.  In the end I resolved my problem by creating a single component key with the description field.  This allows me to display the description and save the ID as per the normal example.

The 'More Assignments' still didn't work, though because loc:lookupdone still didn't turn on, but it is no longer an issue for me. It's a new problem since presumably 7.11, after 7.07 for sure, but it doesn't seem like many have encountered it.

Thanks again.

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: Lookup problem in 7.12
« Reply #5 on: July 01, 2013, 02:30:48 AM »
Hi Casey,

>>  In the end I resolved my problem by creating a single component key with the description field.  This allows me to display the description and save the ID as per the normal example.

at this point this is definitely a requirement (and always has been - although _possibly_ you had clever code which allowed it to not be a requirement before.) - but officially it's definitely a requirement at the moment.

I'll check out the "more assignments" - but I think they are working in my current (internal) build.

cheers
Bruce

estadok

  • Jr. Member
  • **
  • Posts: 84
    • View Profile
    • EstaSoft
    • Email
Re: Lookup problem in 7.12
« Reply #6 on: July 01, 2013, 11:35:38 AM »
Hi Bruce!

>> I'll check out the "more assignments" - but I think they are working in my current (internal) build.

To duplicate effect try to play with option "display description instead of value" on lookup field. When you tick on this option the "more assignments" works fine, but if you tick off this option the "more assignments" doesn't work.
Clarion 9.0.10376
NetTalk 7.26
SecWin 6.25
StringTheory 1.92

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: Lookup problem in 7.12
« Reply #7 on: July 04, 2013, 12:27:59 AM »
fixed in 7.14