Removing a field from QuickFilter field list {Overriding method}


Lets say we need to remove a particular field option from the quick filter drop down.


This can be achieved in the following way :


  1. Override the applyBuild method of the QuickFilter. 
  2. Next, we will write the code after super so that the list is first initialised.

 public void applyBuild()
    {
        super();
        List myList= this.parmFieldList();
        List myListLabels = this.parmFieldLabels();

        ListIterator myListLabelIterator = new ListIterator(myListLabels);
        ListIterator myListIterator = new ListIterator(myList);
        while(myListLabelIterator.more())
        {
            if (myListLabelIterator.value() == fieldPName(SalesTable, SalesId))
            {
                myListIterator.delete();
                myListLabelIterator.delete();
            }
            myListLabelIterator.next();
            myListIterator.next();
        }
        this.parmFieldLabels(myListLabels);
        this..parmFieldList(myList);
    }



This removes the SalesId field from our quick filter field lists.






Comments