NetTalk Central

Author Topic: Multiple lookup and alias not working  (Read 3011 times)

John Fligg

  • Sr. Member
  • ****
  • Posts: 361
    • View Profile
    • Ambrit Software
    • Email
Multiple lookup and alias not working
« on: January 11, 2012, 05:06:58 AM »
Please find attached a test app.

There is an Item table which links to a contact table. As there are 4 items per customer I have 4 lookups on the contact form. Lookup1 relates to Item, Lookup2 relates to ItemAlias1, Lookup3 relates to ItemAlias2 and Lookup4 relates to ItemAlias3.

So add 4 untique items. Now go to Contact and try each lookup in turn.

Lookup 1 works but lookups 2,3, and 4 do not.

Any ideas please? This one is very critical for me I am afraid.

BTW I am assuming you can and should use aliases in this situation?

Thanks

John

[attachment deleted by admin]

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: Multiple lookup and alias not working
« Reply #1 on: January 11, 2012, 06:30:27 AM »
>> Please find attached a test app.

I see I have trained you well!
You are rewarded with speedy responses...
Perhaps others will learn.

>> So add 4 untique items. Now go to Contact and try each lookup in turn.
>> Lookup 1 works but lookups 2,3, and 4 do not.

Let's use Lookup 2 as the example of what is wrong.
a) the lookup procedure is set as BrowseItem. this browse uses the Item table.
b) your Value and Description fields are using a completely different table (Item1).

aside: An alias is just another table declaration. As far as the program is concerned it's a different table.

>> BTW I am assuming you can

well, yes, you _can_, but then you'd need 4 browses - one on each of the tables. Sounds like too much work if you ask me...(well, to be fair, you _did_ ask...)

>> and should use aliases in this situation?

nope. No need to use Aliases. You can have as many lookups on the same table, with the same value and description fields as you like. I just change lookup 2, 3 and 4 to be the same as lookup 1 and it works fine.

cheers
Bruce


John Fligg

  • Sr. Member
  • ****
  • Posts: 361
    • View Profile
    • Ambrit Software
    • Email
Re: Multiple lookup and alias not working
« Reply #2 on: January 11, 2012, 07:01:14 AM »
Sssh Bruce - don't tell everyone, you'll be inundated <g>

More or less what I guessed then. I did wonder about the aliases as after the first lookup the connection would be broken anyway whereas in Clarion it remains open.

Thanks

John