Normal Topic multiple lookups? (Read 1106 times)
FSGROUP
Full Member
***
Offline


No personal text

Posts: 179
Location: Edmonton, Alberta, Canada
Joined: Jan 14th, 2004
multiple lookups?
Mar 1st, 2004 at 6:46pm
Print Post Print Post  
Will this be implemented in Sesame in the near future? I think it would make things alot easier. For example, if I want to check to see whether a person already exists in the database by checking their first and last name.
  
Back to top
IP Logged
 
BOBSCOTT
Senior Member
Members
*****
Offline


That Darn Computer #$X#
{curse words}

Posts: 1195
Joined: Nov 22nd, 2002
Re: multiple lookups?
Reply #1 - Mar 1st, 2004 at 7:43pm
Print Post Print Post  
Could you please give a larger example of what you are trying to accomplish? Because I am not sure of what you mean by lookup by first and last name.

Do you mean in a search? Or a popup list or ?

Thanks
  

Team – Together Everyone Achieves More
Back to top
 
IP Logged
 
The Cow
YaBB Administrator
*****
Offline



Posts: 2530
Joined: Nov 22nd, 2002
Re: multiple lookups?
Reply #2 - Mar 1st, 2004 at 8:11pm
Print Post Print Post  
I think he means, multi-keyed xlookups - not do-able in Q&A's XLookup or Sesame's - more SQL-ish, where you can use an expression involving multiple fields in a SELECT statement with the WHERE clause.

You can do this in Sesame by using a hidden LE on the form and in On Form Change, combine the first and last names into the hidden "Full Name" LE - then do the XLookUp with the hidden "Full Name" LE as the key field.

  

Mark Lasersohn&&Programmer&&Lantica Software, LLC
Back to top
IP Logged
 
FSGROUP
Full Member
***
Offline


No personal text

Posts: 179
Location: Edmonton, Alberta, Canada
Joined: Jan 14th, 2004
Re: multiple lookups?
Reply #3 - Mar 1st, 2004 at 8:12pm
Print Post Print Post  
Well, I would like to create a popup list with all the names of the customers in the database. However, the first name and last name are stored in two separate fields. Problem is I want the names to show up in the list as "Smith, Jon", "Gaine, Steve", etc..

I would also like to perform a search on first and last names in SBasic.  Say I have a customer in the database named Jon Smith.  His spouse is Karen Smith. I want to set his Contact field to be "Mr. and Mrs. Jon Smith" if Karen is also stored in the database as a customer, otherwise Contact should be "Mr. Jon Smith".

Using XLookup, I can only search on one field, which means, I can look up "Smith" or "Karen" but not both.
  
Back to top
IP Logged
 
FSGROUP
Full Member
***
Offline


No personal text

Posts: 179
Location: Edmonton, Alberta, Canada
Joined: Jan 14th, 2004
Re: multiple lookups?
Reply #4 - Mar 1st, 2004 at 11:12pm
Print Post Print Post  
How would I go about using the hidden field method in a subform?

I have an ID field that is the matching field b/w the form and subform.  My subform does not contain any client name information.  What I would like to achieve is to have a popup list of client names(last, first) if I am in Add/Update mode for the subform only. Makes it easier than searching a client's ID.

Thanx

  
Back to top
IP Logged
 
FSGROUP
Full Member
***
Offline


No personal text

Posts: 179
Location: Edmonton, Alberta, Canada
Joined: Jan 14th, 2004
Re: multiple lookups?
Reply #5 - Mar 1st, 2004 at 11:16pm
Print Post Print Post  
ignore my last post. Smiley
  
Back to top
IP Logged
 
Justin_ICC
Junior Member
**
Offline



Posts: 95
Joined: Feb 5th, 2004
Re: multiple lookups?
Reply #6 - Mar 2nd, 2004 at 8:50pm
Print Post Print Post  
Is there no plans to add something resembling SQL queries? I am finding it very difficult to accomplish some tasks that should be simple except for the fact that there is no multi-keyed lookups. I don't like the idea of having to create hidden fields to re-store the same information that is already there to be used if only we could do a multi-key lookup I guess I'll try using hidden LE's but I really do think that a multi-key lookup would make development much easier and allow for more powerful (and better designed) applications.

Just my 2 cents.
  
Back to top
 
IP Logged
 
TJCajun
Junior Member
**
Offline


"Laissez les bons temps
rouler"

Posts: 72
Location: Louisiana
Joined: Nov 25th, 2002
Re: multiple lookups?
Reply #7 - Mar 2nd, 2004 at 10:11pm
Print Post Print Post  
Rather than creating hidden LE's to hold data in lieu of multi-key lookup, could variables be used?  These do not require the creation of additional LE's, nor the "wasted" storing of duplicate data?  I'm no programmer, so there may be some problems that I'm not aware of - just wanted to throw this into the discussion.  Looks like there are "regular" variables, static variables, and Global Static variables to consider...
  
Back to top
IP Logged
 
Hammer
YaBB Administrator
Lanticans
*****
Offline


Fire bad. Tree pretty.

Posts: 3436
Location: Ohio
Joined: Nov 22nd, 2002
Re: multiple lookups?
Reply #8 - Mar 2nd, 2004 at 10:22pm
Print Post Print Post  
Variables would not work in this case. The records in the external database being checked for a key match don't get to declare stop and variables and combine the values before being checked. Variables exist in forms. The external database being checked for matching records doesn't have a Form at that point.
  

- Hammer
The plural of anecdote is not data.
Back to top
IP Logged