Normal Topic XLookupSourceListAll tweak needed (Read 767 times)
Blair Wettlaufer
Junior Member
Members
**
Offline


No personal text

Posts: 98
Location: Hamilton, ON
Joined: Jun 4th, 2005
XLookupSourceListAll tweak needed
Jun 8th, 2005 at 3:24am
Print Post Print Post  
Me again,

First of all, thanks to everyone who's being patient with my many, many questions!  I appreciate the help.

I'm currently trying to figure out XLookupSourceListAll, so I built a test database with the fields FirstName, LastName, RecNo, and MatchNo.  I have it running the code below to search for matching first names on form entry.

My questions are this:

1) How can I exclude the current recorod from the search?

2) How can I best add just the RecNo to the keyword field MatchNo?

Thanks!
Blair

==================================

var vRawName as String
var vMatchName as String
var vPickName as String

vRawName = LastName

if @Mode() = 1 THEN
{      
     vMatchName = @Replace(@XLookupSourceListAll(@FN, vRawName, "LastName", "LastName;FirstName;RecNo"), ";", ", ")
     if vMatchName <> "" THEN
     {
           PopupSelectPosition(3, 250, 150)
           vMatchName = @Replace(vMatchName,@newline(), ";")
           vPickName = @Popupmenu(vMatchname, "SELECT MATCH")
           MatchNo = Matchno + vPickName
     }
}
  

Coesper erat: tunc lubriciles altravia circum&&Urgebant gyros gimbiculosque tophi:&&Moestenui visae borogovides ire meatu:&&Et profugi gemitus exgrabuere rathae
Back to top
 
IP Logged
 
Bob_Hansen
Senior Member
Members
*****
Offline


WOW, They have the Internet
on computers now!

Posts: 1861
Location: Salem, NH
Joined: Nov 24th, 2002
Re: XLookupSourceListAll tweak needed
Reply #1 - Jun 8th, 2005 at 3:32am
Print Post Print Post  
How about adding an IF statement before the PopUp that excludes the RecNo? 

Combine it with "  if vMatchName <> "" THEN { "
  



Bob Hansen
Sesame Database Manager Professional
Sensible Solutions Inc.
Salem, NH
603-898-8223
Skype ID = sensiblesolutions
Back to top
IP Logged
 
Blair Wettlaufer
Junior Member
Members
**
Offline


No personal text

Posts: 98
Location: Hamilton, ON
Joined: Jun 4th, 2005
Re: XLookupSourceListAll tweak needed
Reply #2 - Jun 8th, 2005 at 4:01am
Print Post Print Post  
Hi Bob!

That's exactly what I'm looking to do -- unfortunately, I don't know what command to use to exclude data, and there's nothing immediately apparent in the programming guide.

Can someone tell me how to exclude a single record from a series of returned data from XLookupSourceList?
  

Coesper erat: tunc lubriciles altravia circum&&Urgebant gyros gimbiculosque tophi:&&Moestenui visae borogovides ire meatu:&&Et profugi gemitus exgrabuere rathae
Back to top
 
IP Logged
 
The Cow
YaBB Administrator
*****
Offline



Posts: 2530
Joined: Nov 22nd, 2002
Re: XLookupSourceListAll tweak needed
Reply #3 - Jun 8th, 2005 at 12:04pm
Print Post Print Post  
There are a couple of ways. All of the "X" commands use the retrieve syntax to do the key match - so it may to possible to exclude the record by not including it in the first place. You can also use any of the StringArray commands on the result to filter out that record after the fact.
  

Mark Lasersohn&&Programmer&&Lantica Software, LLC
Back to top
IP Logged