Page Index Toggle Pages: 1 2 [3]  Send Topic Send Topic Print Print
Very Hot Topic (More than 25 Replies) Combining Elements to Make Unique Ext. Key (Read 4304 times)
Ray the Reaper
Global Moderator
Members
Lantica Support
*****
Offline


The One & The Only

Posts: 2480
Joined: Aug 20th, 2003
Re: Combining Elements to Make Unique Ext. Key
Reply #30 - Apr 10th, 2006 at 4:27pm
Print Post Print Post  
Back to the original subject.

You can do this currently in 1.1.3. You just need to do one X command for each value you want to search on. The code below was designed in a Mass Update of the sample Customers application. It will return three records, only those that have a key value less than 1000 and the first name starts with a b.

Code
Select All
Var vRet1 as String
Var vRet2 as String
Var vFinal as String

vRet1 = @XLookupSourceListAll(@Fn, "< 1000", "Key", "Key;First;MI;Last;Company")
vRet2 = @XLookupSourceListAll(@Fn, "b..", "First", "Key;First;MI;Last;Company")
SetStringArraySeparator(@Newline())
vFinal = @ContainsStringArray(vRet1, vRet2, 0)
RestoreStringArraySeparator()

Writeln(vFinal) 



-Ray
  

Raymond Yoxall Consulting
ray.yoxall@gmail.com
ryoxall@lantica.com
Sesame Applications, Design and Support
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: Combining Elements to Make Unique Ext. Key
Reply #31 - Apr 10th, 2006 at 4:46pm
Print Post Print Post  
Hi Ray,
This is really a nice way of doing it. Got to get a little deeper into these powerful @stringarray functions. Thanks.

Bharat Naik
  
Back to top
 
IP Logged
 
Carl Underwood
Senior Member
Members
*****
Offline



Posts: 1350
Location: New Hampshire
Joined: Mar 11th, 2003
Re: Combining Elements to Make Unique Ext. Key
Reply #32 - Apr 10th, 2006 at 5:46pm
Print Post Print Post  
Ray,

Very slick approach -- and all without loops. 8)

With a little modification, I think this would be better than my intended approach.
  


Carl Underwood
CDU Computer Consulting LLC
Epsom, New Hampshire
Back to top
IP Logged
 
Page Index Toggle Pages: 1 2 [3] 
Send Topic Send Topic Print Print