Normal Topic XLOOKUP Problem (Read 1338 times)
billgordon
Junior Member
**
Offline


No personal text

Posts: 61
Joined: Dec 31st, 2003
XLOOKUP Problem
Jan 26th, 2004 at 3:54pm
Print Post Print Post  
I have the sample Zipcode.db in the c:\sesame\data directory I want to upon exiting the zip code field do a xlookup and return the values to the correct fields.

I used on field exit language of
Xlookup("zipcode.db",zip,"zip code","city",city)

This does not return the city name from the sample db.

What am I doing wrong?
Can I also return multiple fields like city, state etc.

Please help
  
Back to top
 
IP Logged
 
The Cow
YaBB Administrator
*****
Offline



Posts: 2530
Joined: Nov 22nd, 2002
Re: XLOOKUP Problem
Reply #1 - Jan 26th, 2004 at 4:20pm
Print Post Print Post  
The XLookup should read:

Xlookup("zipcode.db", zip code, "zip code", "city", city)
  

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


No personal text

Posts: 61
Joined: Dec 31st, 2003
Re: XLOOKUP Problem
Reply #2 - Jan 26th, 2004 at 4:27pm
Print Post Print Post  
The field in my database is called zip
The field in Zipcodes.db is called zip code

So is what I had  not correct?
Xlookup("zipcode.db",zip,"zip code","city",city)
  
Back to top
 
IP Logged
 
The Cow
YaBB Administrator
*****
Offline



Posts: 2530
Joined: Nov 22nd, 2002
Re: XLOOKUP Problem
Reply #3 - Jan 26th, 2004 at 4:38pm
Print Post Print Post  
I thought you were calling it from within zipcode.db (sorry, my bad) - but seeing that that is not the case, double check that the path to the file is correct. Usually sesame is invoked from:

C:\Sesame

The zipcode.db is in C:\Sesame\Data\Samples.

So you might want to try the full path to file:

Xlookup("C:\Sesame\Data\Samples\ZipCode.db", zip, "zip code", "city", city)
  

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


No personal text

Posts: 61
Joined: Dec 31st, 2003
Re: XLOOKUP Problem
Reply #4 - Jan 26th, 2004 at 6:15pm
Print Post Print Post  
Quote:
So you might want to try the full path to file:

Xlookup("C:\Sesame\Data\Samples\ZipCode.db", zip, "zip code", "city", city)


The complete path solved that problem thanks.

In qa I could pass multiple fields of data by adding external field name , to be returned to field like such

Xlookup("C:\Sesame\Data\Samples\ZipCode.db", homezip, "zip code", "city", Homecity, "state" ,state)

But this does not work in Sesame. Is there another way?
  
Back to top
 
IP Logged
 
Bharat_Naik
Senior Member
Members
*****
Offline


Ever ready to learn and
share

Posts: 1202
Location: Chicago,  Illinois
Joined: Dec 16th, 2003
Re: XLOOKUP Problem
Reply #5 - Jan 26th, 2004 at 6:32pm
Print Post Print Post  
Just break it down like this.


Xlookup("C:\Sesame\Data\Samples\ZipCode.db", homezip, "zip code", "city", Homecity)

Xlookup("C:\Sesame\Data\Samples\ZipCode.db", homezip, "zip code",  "state", state)
  
Back to top
 
IP Logged