Login
`
Templates, Tools and Utilities
|
||
Icetips Article
Back to article list
Search Articles
Add Comment
Printer friendly
Direct link
Par2: Multi field locator 1999-03-20 -- Parker MacDonald Thanks to the suggestions of Geoff and Dennis, posted earlier, I now have a
fully functional multipart key browse working! I don't know how you guys
figure this stuff out but if I could FTP you a beer it would be on its way
now!
Here is what worked for me in the end:
In the Local Objects/BRW1/Takekey Procedure
embed point AFTER Parent Call I have
IF ~ReturnValue
Select(?LOCATOR_STRING)
Press(chr(keychar()))
END
In the Control Events/?LOCATOR_STRING/Accepted embed point I have
!prime locator key fields
x#=instring(',',LOCATOR_STRING,1,1)
if x#>0
CUST:FIRST_NAME = CLIP(sub(LOCATOR_STRING,x#+1,LEN(LOCATOR_STRING)))
CUST:LAST_NAME = sub(LOCATOR_STRING,1,x#-1)
ELSE
CUST:FIRST_NAME = ' '
CUST:LAST_NAME = CLIP(LOCATOR_STRING)
end
BRW1.ResetFromBuffer()
POST(Event:NewSelection,?Browse:1)
SELECT(?BROWSE:1)
My code differs from Geoff's only in that:
1. I wanted to use a comma as the field seperator for first and last name
2. When only a last name was entered I took the extra precaution of
blanking out the first name in case any data was left hanging around
3. I added the SELECT(?BROWSE:1) at the end because without it after
performing the first locate I was left sitting on a button and the Takekey
method for the Browse no longer put keystrokes int the LOCATOR_STRING
Once again, many thanks
Today is November 21, 2024, 3:48 am This article has been viewed 35196 times.
|
|