SetBrowseFilter

I'm trying to use the SetBrowseFilter method with an external script using the AR_Customer_ui object. and the InvokeLookup method. I need to show only Active Customers with a SortField set to a value. I can't seem to find any documentation for the SetBrowseFilter argument string. Can someone post an example of setting Active and SortField with this method?

The SetBrowseFilter function is in SY_Service which AR_Customer_ui or AR_Customer_bus doesn't seem to inherit. It looks like AR_Customer_svc does inherit SY_Service. Would the best approach be to instantiate AR_Customer_svc along with my AR_Customer_ui?

Parents
  • 0

    SetBrowseFilter works with one of the table's indexes.  Choose your index, set a value (as the beginning text for that index), and scroll through the filtered list (remembering to set the index back when done).  It doesn't work for any field of your choosing.

    When I need to get a list for specific alternate criteria (independent of the available indexes), I use an ODBC "select" query.

  • 0 in reply to Kevin M

    Thanks Kevin for your reply and support. The default browse Index is fine for this project. I just need to set the browse filter so only active customers and records that contain a value I set for sort field are shown. If I set these filters in 100 and save the filter it works as expected when the customer InvokeLookup is called via BOI. The InvokeLookup also has an optional 3rd parameter to set the start record for multi-keyed files. (Customer Contact passing the customer number) It would be awesome if the InvokeLookup also supported passing a filter string as well. 

    Can you post an example of setting the SetBrowseFilter string so that Status="Active" and the SortField I defined are shown? Hopefully setting the SetBrowseFilter also affects the ALE lookup. Do you know where the custom filter string is stored when you save it in 100? I will also need to do something similar for my Items lookup with setting a custom filter.

Reply
  • 0 in reply to Kevin M

    Thanks Kevin for your reply and support. The default browse Index is fine for this project. I just need to set the browse filter so only active customers and records that contain a value I set for sort field are shown. If I set these filters in 100 and save the filter it works as expected when the customer InvokeLookup is called via BOI. The InvokeLookup also has an optional 3rd parameter to set the start record for multi-keyed files. (Customer Contact passing the customer number) It would be awesome if the InvokeLookup also supported passing a filter string as well. 

    Can you post an example of setting the SetBrowseFilter string so that Status="Active" and the SortField I defined are shown? Hopefully setting the SetBrowseFilter also affects the ALE lookup. Do you know where the custom filter string is stored when you save it in 100? I will also need to do something similar for my Items lookup with setting a custom filter.

Children
  • 0 in reply to scmember

    Invoking an ALE is a completely different and separate function to SetBrowseFilter. 

    There is no way to use alternate fields / filters with SetBrowseFilter (AFAIK), only index based filters.  No "example" is available using Status or SortField.  (It's for things like scrolling through open SO filtered to a specific customer's orders, using the KCustomer index in SO header).  A Master Developer could probably add an index for other fields, but that is not within my skill set.

    If you want to set up an ALE with your filter, and invoke that... it would likely use the filter set in the ALE (not something dynamic passed as part of the script) but I haven't played with InvokeLookup before so I'm not sure what is possible there.

  • 0 in reply to Kevin M

    Can you tell me where the user custom filter string is stored? I can ether modify the record or string within my BOI script if that is the only way to affect ALE lookups with BOI.

  • 0 in reply to scmember

    ALE settings are in a set of SOA files.  I don't believe they are exposed to BOI scripting.

  • 0 in reply to Kevin M

    I checked the files in DFMD after saving the filters in 100. I can't find a record that matches my filter settings.

  • 0 in reply to scmember

    I know those SOA files hold the ALE records, but perhaps the filters are stored somewhere else.  I really don't know.

  • 0 in reply to Kevin M

    Actually the ALE Lookup definition is spread out over the five files you posted. SWQUERY is where all the filter magic happens.

    SY1Q01 Query - Main Definition

    SY1Q02 Query - Column definitions

    SY1Q03 Query - Filter Definitions

    SY1Q04 Query - Expressions

    SY1QDD ALE Data Dictionary Specifications

    Found it in SY1Q04.

    Key=[JRSJRSA00AR_Customer         F$A2                 B]
        ....+....1....+....2....+....3....+....4....+....5....+....6....+....7....+...
    01 [JRSJRSA00AR_Customer         F$A2                 BSAGE100