Filter by item name in - Inventory management/Inquiries/On-hand
<p>As far as I understand, ProductName column is shown via a display methods. At least for my implementation here and this method resides in InventSum table:</p>

<pre><code>display public ItemNameDisplay itemName()
{
    // Fields might not have been selected on the specified buffers, or might have been updated since selection
    this.checkInvalidFieldAccess(false);

    if (this.InventDimId)
    {
        return this.inventTable().itemName(InventDim::find(this.InventDimId));
    }
    return this.inventTable().itemName();
}
</code></pre>

<p>When I hit Ctrl + G and try to filter the data, this option is disabled for the above column and I think this happens due to that display method.  Is there any way I could achieve this functionality?</p>

<p>Should I try ( at right click ) to add another MenuItem there and do the filtering with the help of a new dialog ( where i will write down the item name),somehow followed by a refresh on the form? </p>

<p><strong>Update 1:</strong></p>

<p>I've found and edited this approach for my special case:</p>

<pre><code>public void context()
{
   InventTable inventTable;

   int selectedMenu;
   real test;
   formrun fr;
   Args ag;
   Itemname strtext;
   querybuilddataSource qb1;
   queryrun qr;
   query q;
   PopupMenu menu = new PopupMenu(element.hWnd());
   int a = menu.insertItem('Find');
   int c = menu.insertItem('Remove Filter');


   selectedMenu = menu.draw();

   switch (selectedMenu)
   {
       case -1:
       break;

       case a:
       ag = new args('SysformSearch');
       fr = new formrun(ag);
       fr.run();
       fr.wait();
       strtext = fr.design().controlName('FindEdit').valueStr();

      if(strtext)
      {
          select ItemId from inventTable
          where inventTable.NameAlias == strtext;

          InventSum_DS.filter(FieldNum(InventSum,ItemId),Sysquery::value(inventTable.ItemId));
      }
      break;

      case c :
          InventSum_DS.removeFilter();
      break;

      Default:
      break;
   }
}
</code></pre>

<p>Still I think is not the correct way to just display a new PopupMenu. I would like to hook to the usual menu and add the new Find and Remove Filter right there. And .. remove filter takes a while, I should signal this somehow so the user don't panic.</p>