Documentation

Grid panel/filter panel: Filtering a Lookup

It is possible to filter a lookup whether it is in a grid or in a filter.
To do so you have to intercept the action of the opening of the lookup, then you have to filter its grid.
Here an example:
  1. Create a new action js. This will be the action that will filter the lookup.                      
lkuStore.baseParams.filterNames = 'mobileIdTrip,deviceId,';   /*field to filter, always put a , at the end*/
lkuStore.baseParams.filterOps = '=,=,';  /* filter operator */
lkuStore.baseParams.filterValues = args.mobileId + ',' + args.deviceId + ','; /* filter value */
/* optional parameter = lkuStore.baseParams.caseSensitives = true/false */

      2. Go to the filter panel and then on Event Components and add a new event:

    1. Field of the database: field where the lookup is hooked.
    2. Event: Before grid opening.
    3. Action: our action (previously created)
    3. If you want to validate filtering what the user write in the lookup, you have to hook the same action to the action Before validation   
    4. Now your lookup will be filtered as described in the JS action in the first point.