Setup

Visual LANSA Framework

Setup

To override the search options, modify your version of  the IIP component UF_SYSTM.

Step 1

Start by activating the override feature by setting PavQFUserOverride to True in this routine:

* To turn on Quick Find list overriding change FALSE to TRUE

* in this property get routine ...

 

Ptyroutine Name(GavQFUserOverride) Options(*Redefine)

Set Com(#PavQFUserOverride) Value(True)

Endroutine

 

(This also stops the framework from searching its own list of business objects and applications.)

 

Step 2

Control the complete list of all possible options that the user can search through by adding your options in this routine:

* Use this method to load the Quick Find list with your own values

* You must set PavQFUserOverride to true for this to be active

 

Mthroutine Name(avQFLoadSearchList) Options(*REDEFINE)

 

Invoke #avQuickFind.AddSearchListEntry Text('Option One - Resources') GUID('GUID1')

Invoke #avQuickFind.AddSearchListEntry Text('Option Two - Selected and Current') GUID('GUID2')

Invoke #avQuickFind.AddSearchListEntry Text('Option Three - Techniques') GUID('GUID3')

 

Endroutine

For each possible entry, add the text to be displayed (82 characters), and a unique identifier (32 characters). 

When the user enters a search value, the option text will be searched to see if it contains the search string, and will appear as an option for the user if it does.

 

Step 3

Control what happens when the user clicks on an option using this routine:

What you do could be anything, but most commonly would be a switch.

* This routine receives the selection that the end-user made in the Quick Find list.

* This routine determines what happens when the user selects an entry from the Quick Find list

* You must set PavQFUserOverride to true for this to be active

 

Mthroutine Name(avQFActionSelection) Options(*REDEFINE)

 

define #vf_wkGUID reffld(#VF_ELIDN)

change #vf_wkGUID #GUID

 

Case OF_FIELD(#vf_wkGUID)

 

when '= GUID1'

* Resources

Invoke #avFrameworkManager.avSwitch To(BusinessObject) Named(DEM_ORG_SEC_EMP) Execute(Details) Caller(#Com_Owner)

 

when '= GUID2'

* Selected and Current

Invoke #avFrameworkManager.avSwitch To(BusinessObject) Named(BD8D1D64689F468E8FA84DA2DA1A87FA) Caller(#Com_Owner)

 

when '= GUID3'

* Programming Techniques application

Invoke #avFrameworkManager.avSwitch To(Application) Named(78A26552E6E94627BBCC4DF3A248CD1F) Caller(#Com_Owner)

 

 

endcase

 

Endroutine

 

 

Step 4 (Optional)

You can cause the complete list of options to be rebuilt.

Normally the complete list of all possible options that the user can search through is built only once. However, it is possible to indicate to the QuickFind component that it should rebuild the list of possible options the next time the user modifies the search string.

This can be done from anywhere that can access #uSystem (e.g. a command handler or filter), with an instruction like:

 

set #USYSTEM.uUserIIP avQFRebuildList(true)

 

If setting this property to true and using the override feature, it is necessary for the avQFLoadSearchList IIP routine to reset avQFRebuildList to false when it has finished loading.