Hot Topic (More than 10 Replies) xlookup (Read 1896 times)
proudpoppy
Full Member
Members
***
Offline


Do What ??

Posts: 420
Location: South Carolina
Joined: Apr 7th, 2004
xlookup
Jul 22nd, 2004 at 10:14pm
Print Post Print Post  
Does anyone see what I'm doing wrong here I get no errors but it returns nothing:

XLookup("data\tentreg.db",LE36,"tentreg!projapt","project",LE43)   :                           

'(

The LE36 element was added by sesame and bound to the work order form field "projapt", the LE43 is the element on my work order form to put the project into and is bound to the field project, does it have to be a unbound element to fetch a xlookup from another database?
  
Back to top
 
IP Logged
 
proudpoppy
Full Member
Members
***
Offline


Do What ??

Posts: 420
Location: South Carolina
Joined: Apr 7th, 2004
Re: xlookup
Reply #1 - Jul 22nd, 2004 at 10:17pm
Print Post Print Post  
The Cry was a typo ignore it.
  
Back to top
 
IP Logged
 
Steve_in_Texas
Senior Member
*****
Offline


No personal text

Posts: 893
Location: San Antonio
Joined: Feb 21st, 2004
Re: xlookup
Reply #2 - Jul 22nd, 2004 at 10:35pm
Print Post Print Post  
Remember, X commands cannot be tested in "Preview Mode". You must reconcile and test them in Sesame "runtime" program.

ALso, I pasted below some tips that Erika gave me about using the correct field names in an xlookup.

Also, keep a close eye on your quotes used in those commands. I'm always getting in trouble with the quotes.

Hope this helps!
Steve

From Erika:
You should be using LE names, not field names. If the LE's have been deleted, Sesame will have no way of knowing what field they used to be bound to and, therefore, will not be able to get the data from that field. You cannot do X Commands on fields that have no LE's bound to them. The LE is the "window" on the field.

  
Back to top
IP Logged
 
proudpoppy
Full Member
Members
***
Offline


Do What ??

Posts: 420
Location: South Carolina
Joined: Apr 7th, 2004
Re: xlookup
Reply #3 - Jul 22nd, 2004 at 10:48pm
Print Post Print Post  
Grin  Didn't know about the preview mode, worked fine after I reconciled it. Thanks millions.
  
Back to top
 
IP Logged
 
Steve_in_Texas
Senior Member
*****
Offline


No personal text

Posts: 893
Location: San Antonio
Joined: Feb 21st, 2004
Re: xlookup
Reply #4 - Jul 22nd, 2004 at 10:52pm
Print Post Print Post  
No problem. Happens to everyone!

Steve
  
Back to top
IP Logged
 
proudpoppy
Full Member
Members
***
Offline


Do What ??

Posts: 420
Location: South Carolina
Joined: Apr 7th, 2004
Re: xlookup
Reply #5 - Jul 23rd, 2004 at 1:02pm
Print Post Print Post  
On page 128 of the programming manual it states that "You can replace the application name with @filename or @fn if performing the @xlookup into the current application".Must be missing something can't get it to work. 
If @add then LE43 = @XLOOKUP("@Fn",LE36,"tentreg!projapt","tentreg!project")


  
Back to top
 
IP Logged
 
Hammer
YaBB Administrator
Lanticans
*****
Offline


Fire bad. Tree pretty.

Posts: 3436
Location: Ohio
Joined: Nov 22nd, 2002
Re: xlookup
Reply #6 - Jul 23rd, 2004 at 1:04pm
Print Post Print Post  
Quote:
On page 128 of the programming manual it states that "You can replace the application name with @filename or @fn if performing the @xlookup into the current application".Must be missing something can't get it to work. 
If @add then LE43 = @XLOOKUP("@Fn",LE36,"tentreg!projapt","tentreg!project")


Ditch the quotes around @FN. With the quotes, Sesame is looking for an application with the literal filename "@FN". Without the quotes, it looks for the application returned by the builtin SBasic function @FN which returns the current filename.
  

- Hammer
The plural of anecdote is not data.
Back to top
IP Logged
 
proudpoppy
Full Member
Members
***
Offline


Do What ??

Posts: 420
Location: South Carolina
Joined: Apr 7th, 2004
Re: xlookup
Reply #7 - Jul 23rd, 2004 at 1:26pm
Print Post Print Post  
Still not working, I have two databases in the same application, I trying to do a @xlookup from my masterwo database to my tentreg database in the same application.
  
Back to top
 
IP Logged
 
Hammer
YaBB Administrator
Lanticans
*****
Offline


Fire bad. Tree pretty.

Posts: 3436
Location: Ohio
Joined: Nov 22nd, 2002
Re: xlookup
Reply #8 - Jul 23rd, 2004 at 1:31pm
Print Post Print Post  
You also should not put the form name on the last argument. It is assumed that the LE to be returned is on the same form as the LE to be matched.

Try something like:
LE43 = @XLOOKUP(@Fn, LE36, "tentreg!projapt", "project")
  

- Hammer
The plural of anecdote is not data.
Back to top
IP Logged
 
Steve_in_Texas
Senior Member
*****
Offline


No personal text

Posts: 893
Location: San Antonio
Joined: Feb 21st, 2004
Re: xlookup
Reply #9 - Jul 23rd, 2004 at 1:31pm
Print Post Print Post  
Do you have Security set in either app? Perhaps you are running into the security bug.

See the Lantica page for a 'workaround'.

Steve
  
Back to top
IP Logged
 
proudpoppy
Full Member
Members
***
Offline


Do What ??

Posts: 420
Location: South Carolina
Joined: Apr 7th, 2004
Re: xlookup
Reply #10 - Jul 23rd, 2004 at 1:58pm
Print Post Print Post  
That worked Erika, Thanks      Roll Eyes
  
Back to top
 
IP Logged