# Reset Incremental Locator in Legacy

**URL:** <https://clarionhub.com/t/reset-incremental-locator-in-legacy/8628>\
**Category:** questions\
**Tags:** browse\
**Created:** [September 21, 2025, 1:44pm UTC](https://clarionhub.com/t/reset-incremental-locator-in-legacy/8628 "2025-09-21T13:44:41Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![NeutronBoy](https://clarionhub.com/user_avatar/clarionhub.com/neutronboy/32/4355_2.png) [@NeutronBoy](https://clarionhub.com/u/NeutronBoy)\
**Post date:** [September 21, 2025, 1:44pm UTC](https://clarionhub.com/t/reset-incremental-locator-in-legacy/8628/1 "2025-09-21T13:44:41Z")

</div>

CW8, Legacy

I want to use a button to reset an Incremental Locator on a browse and cannot get it to work properly. The Incremental Locator piece works just fine, records are located and user can backspace to edit the locator. I am using a local variable (LOC:SearchPhrase) to capture the input.

I have a button to clear the variable, and it does so, but after doing so, the browse will not accept anymore input for a different search. I have been trying several things (after looking at Source) but cannot find what to do. The SET/NEXT was out of desperation. Here's the things I have ben trying to no avail (not all used at same time):

BUTTON EMBED (POST EVENT HANDLING):

```clarion
CLEAR(LOC:SearchPhrase) 
SET(PAR:Key_Word_File_RecordID,1) ; NEXT(ParsedWords)
DO RefreshWindow
!DISPLAY

!BRW1::Sort1:LocatorValue = LOC:SearchPhrase

!PAR:ParsedWord = LOC:SearchPhrase
!DO BRW1.ResetFromBuffer()

!DO BRW1::LocateRecord 

!DO BRW1::RefreshPage

!SELECT(?Browse:1)
!SELECT(?LOC:SearchPhrase)

```

Any ideas?

---

<div class="post-metadata">

**Author:** ![seanh](https://clarionhub.com/letter_avatar_proxy/v4/letter/s/4af34b/32.png) [@seanh](https://clarionhub.com/u/seanh)\
**Post date:** [September 21, 2025, 11:16pm UTC](https://clarionhub.com/t/reset-incremental-locator-in-legacy/8628/2 "2025-09-21T23:16:15Z")

</div>

Not sure of Legacy, but ABC it’s also a bit complicated and not intuitive. There a property of the locator class called ‘Hidden’ or something like that (It’s been a while) you need to clear that because that what is actually used by the browse.

---

<div class="post-metadata">

**Author:** ![PurpleEdge2214](https://clarionhub.com/user_avatar/clarionhub.com/purpleedge2214/32/5109_2.png) [@PurpleEdge2214](https://clarionhub.com/u/PurpleEdge2214)\
**Post date:** [September 22, 2025, 12:22am UTC](https://clarionhub.com/t/reset-incremental-locator-in-legacy/8628/3 "2025-09-22T00:22:20Z")

</div>

Don’t the Up/Down keys clear the locator?

---

<div class="post-metadata">

**Author:** ![NeutronBoy](https://clarionhub.com/user_avatar/clarionhub.com/neutronboy/32/4355_2.png) [@NeutronBoy](https://clarionhub.com/u/NeutronBoy)\
**Post date:** [September 22, 2025, 12:41pm UTC](https://clarionhub.com/t/reset-incremental-locator-in-legacy/8628/4 "2025-09-22T12:41:25Z")

</div>

Thanks for the responses - I fudged (I think) something based on your responses. It seems like there should be a more direct way to work with the Incremental search template code, but I could not decipher it.

Regarding pressing the UpArrow, yes, that does reset the search parameter (I didn’t know that), but the audience will be one time users of the app and it would be easier to have them press a button to reset.

This is what finally worked:

```clarion
SELECT(?Browse:1) ! refocuses to the Browse being searched
PRESSKEY(UpKey)

```

---

<div class="post-metadata">

**Author:** ![CarlBarnes](https://clarionhub.com/user_avatar/clarionhub.com/carlbarnes/32/1859_2.png) [@CarlBarnes](https://clarionhub.com/u/CarlBarnes)\
**Post date:** [September 23, 2025, 7:54pm UTC](https://clarionhub.com/t/reset-incremental-locator-in-legacy/8628/5 "2025-09-23T19:54:49Z")

</div>

I changed templates to generate this Routine to clear the Locator variables.

```clarion
BRW1::ResetLocator ROUTINE !DscBrw - Clear Locator Value, DecSys Custom
!|
    CASE BRW1::SortOrder
    OF 1
      BRW1::Sort1:LocatorValue = ''
      BRW1::Sort1:LocatorLength = 0
      VENMST:AutoNo = BRW1::Sort1:LocatorValue
    OF 2
      BRW1::Sort2:LocatorValue = ''
      BRW1::Sort2:LocatorLength = 0
      VENMST:VendorNo = BRW1::Sort2:LocatorValue
    OF 3
      BRW1::Sort3:LocatorValue = ''
      BRW1::Sort3:LocatorLength = 0
      VENMST:SortName = BRW1::Sort3:LocatorValue
    END
    DISPLAY

```

This gets done

1. In Event:Selected for Browse
2. In BRW1::ProcessScroll Routine after DO BRW1::PostNewSelection

To recap that is #1 if the Browse takes focus (so was clicked on, or tabbed to, or tab changed); and #2 if the user Scrolls the Browse with Arrows, Page Keys, etc.
