The Browse Class is used to manage the ListBox in an ABC applications and it's ResetFromBuffer() method set the browse to display from the current record in the file buffer. As an example, let us assume that I'm doing a manual locate operation and SEL:Locator is the locator's local variable :
So, at the EVENT:Accepted of ?SEL:Locator, I will do :
OF ?SEL:Locator
CLEAR(POH:Record)
CASE SEL:SortBy
OF '2' ! Date
POHate = SEL:Locator
SET(POH:Key3,POH:Key3)
OF '3' ! Due Date
POHue_Dt = SEL:Locator
SET(POH:Key4,POH:Key4)
OF '4' ! Supplier
POH:Name = SEL:Locator
SET(POH:Key7,POH:Key7)
OF '5' ! Status
POH:Status = SEL:Locator
SET(POH:Key5,POH:Key5)
ELSE ! Number
POH:Ref = SEL:Locator
SET(POH:Key1,POH:Key1)
END
NEXT(POHEAD)
IF NOT ERRORCODE()
BRWOH.ResetFromBuffer()
END
Thank You for help, but I still have problem.
I have probably same problem like Emad with two entry locators (Your answer 28.march 2007).
I try to solve this - defining local variable SEL:Locator = CLIP(PEO:LastName) & ‘ ‘ & CLIP(PEO:FirstName) , defining Browse list and populating SEL:Locator on the Window. Selector not working satisfying to me : when I Typing just Last Name I see all PEOPLE with properly Last Name, but when I typing Last and First Name I lose locator capabilities. Can You help me?
Thanks!
Hi Shankar,
Sorry for late,
Here is example:
DictionaryEOPLE.dct
Tableseople.tps
Columns: ID(@n3), FirstName(@S20), LastName(@s20)
Keys: Key_ID(ID), Key_LastFirst(LastName, FirstName)
Locator: SEL:Locator(@s40) – formula:CLIP(SEL:LastName) & ’ ’ & CLIP(SEL:FirstName)
I wish to make browse Window like this:
Key_LastFirst ?
?(SEL:Locator) Hoskins B______
????????????????????????????????????????????????
ID ? Last and First Name
2 ? Ant Adam
3 ? Hoskins Alex
1 ??Hoskins Bob?
Using a space separator between First & Last name will lead to problems if the Last Name has more than one word like "van Huesen". It's better to use a comma (,) separator i.e. Last Name, First Name. Assuming you are using the comma separator :
S# = INSTRING(',',SEL:Locator,1,1)
CLEAR(PEO:Record)
IF S#
PEO:LastName = SUB(SEL:Locator,1,S#-1)
PEO:FirstName = SUB(SEL:Locator,S#+1,LEN(SEL:Locator)-S#)
ELSE
PEO:LastName = SEL:Locator
END
SET(PEO:Key_LastFirst, PEO:Key_LastFirst)
NEXT(PEOPLE)
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.