Page 1 of 1

Using uHandleSearchorCommand

Posted: Fri Feb 08, 2019 8:19 am
by caseywhite
In a filter I would like to know that someone has typed something in the Instance List Quick search field and not the main quick search box that is global. Is there anyway to know that someone is typing something in the Instance List Quick search.

The method uHandleSearchorCommand fires only when typing in the global quick search field and not the instance list one.

Thanks.

Re: Using uHandleSearchorCommand

Posted: Fri Feb 08, 2019 10:19 am
by MarkD
You could try something like this. Create and snap in a custom instance list browser something like this:

Code: Select all

Begin_Com Role(*EXTENDS #VF_UM040O)

Define_Com Class(#MyCustomerManger) Scope(*APPLICATION) /* Custom framework manager - also defined in the listening filter */

Mthroutine Name(uPerformQuickSearch) Options(*REDEFINE)

#COM_ANCESTOR.uPerformQuickSearch Searchstring(#SearchString) /* Let VF_UM040O do the real search */

#MyCustomManager.SignalInstanceListSearchPerformed /* Tell anyone who is interested that an instance list search was performed */

Endroutine

Mthroutine Name(uCancelQuickSearching) Options(*REDEFINE)

#COM_ANCESTOR.uCancelQuickSearching

#MyCustomManager.SignalInstanceListSearchCancelled /* Tell anyone who is interested that an instance list search was cancelled */

Endroutine

End_Com

This should let anyone listening know that an instance list was searched or a search was cancelled.

If you intend to use this in multiple instance lists and filters then you'd need to distinguish between them.

Re: Using uHandleSearchorCommand

Posted: Fri Feb 08, 2019 10:59 am
by caseywhite
Thanks Mark. Sounds like this should do it.