How to search across multi columns in the drop down window? set as default filter column can be multi columns?

 

Hi All,  when we type a item No. in sales order subform list, we will got a drop down live above, and we can see there is a action set as default filter column, then we can search based on the default filter column, But sometimes our customers wants do it across multi-columns, if we can do that ? how ?

 

 

Thanks in advance...

  • You have to click on the Advanced option and go to the page and then search on multiple fields, you cannot search on the lookup list by multiple columns you can search on the field by pressing Ctrl+F and your search is limited to the field only.
  • In reply to sbhatbng:

    With Filtergroup(-1) you can filter on multiple collumns. It's almost the same like "OR" in SQL.

    Regards
  • Hi Gary,

    May I suggest reading this blog post by :

    I think it answers many of your questions.

  • In reply to Erik P. Ernst:

    Thanks Erik, i have Read. But now I can not get the fitler text which on "Item No.' like the 'a' in the picture. What do you think? Thanks in advance.
  • In reply to Gary:

    What do you mean by you cannot get the filter text?
    You cannot do that with standard "Set as default filter column" - that only works in the Web Client. For the Windows client it will not work, as Peik writes in his blog post. You need to "program" this behavior.
  • In reply to Erik P. Ernst:

    Thanks Erik. Yes , I can not get the filter text . As I wrote the code here: opnepagetrigger, And I even can not set the descending for the column. Below is my code, if there is any error, I hope you could point out. Thanks in advance.

    Item list (page) OnopenPage(trigger)
    FOR x := 0 TO 5 DO
    BEGIN
    FILTERGROUP(x);
    IF GETFILTERS <> '' THEN HasFilters := TRUE;
    MESSAGE(GETFILTERS());
    END;

    IF NOT HasFilters THEN
    BEGIN
    SETCURRENTKEY(Inventory);
    SETFILTER(Inventory,'>%1',0);
    SETASCENDING(Inventory,FALSE);
    END;

  • In reply to Gary:

    You need to set the filters before you can get them. Also it's better to create a function (i.e. UpdatePage or InitPage and put your code there. Easier to maintain in the long run. Especially if you change this in a standard page. The OnOpenPage trigger is only called once on-open, so you might need to call the same filter.
    Which version of NAV is it? Something about not being able to sort on flowfields if older than 2016.
    Have you tried ASCENDING(TRUE);
  • In reply to Erik P. Ernst:

    Thanks Erik, My version is 2016, I have tried ASCENDING(TRUE). , My version is 2016.. Let me think your solution. Just still have no ideal about it.... ,
  • In reply to Gary:

    Are you able to change it "manually", by clicking the column?
  • In reply to Erik P. Ernst:

    But what is the general status of your issue? A few posts above you wrote that the issue now "just" were to get the filter text.

    Did you continue with the page your showed in your first post? Or did you try to implement the functionality Peik described?

    Also if you check for filters on the onOpenPage trigger, then I assume that you have called the page with filters set before? Exactly how do you call the page?
  • In reply to Erik P. Ernst:

    Yup, it is no pb, for manual change, Just the customer wants it can be set by us in code.
Related