RTC: Drop down field doen't apply TableRelation Filter

GoyoGoyo Member Posts: 36
edited 2012-11-12 in NAV Three Tier
Hi. I've been searching information about this problem but i haven't found anything.

I have a new field in Item table, and it has a TableRelation. The relation is with Item table with a filter. When I run the Item card on RTC, the field lookup uses the Dropdown, but it doesn't apply the filter from TableRelation, it shows all the items in the table.

I don't know if it's the normal behaviour of dropdown or if i'm doing something wrong. When I run the Item Card on the classic client, it shows the Item List filtered, so I supose it should have the same behaviour.

Comments

  • skullaskulla Member Posts: 140
    You don't have to do anything special on RTC. Try to compile the page once again or restart the service and see if that makes any difference.
  • GoyoGoyo Member Posts: 36
    I found the problem. In the "OnOpenPage" Trigger there is a "SetRange(Hidden,False);" in order to hide some Items the customer doesn't want to see in the list. If I delete this SetRange, the DropDown is shown fine.

    Now I have another question: Is it possible to set a filter on the OnOpenPage trigger without afecting filters I may or may not set previously?
  • Troubles_In_ParadiseTroubles_In_Paradise Member Posts: 588
    Goyo wrote:
    Now I have another question: Is it possible to set a filter on the OnOpenPage trigger without afecting filters I may or may not set previously?
    :-k couldn't you give an example of what you need?
    ~Rik~
    It works as expected... More or Less...
  • tihomirjurtihomirjur Member Posts: 21
    Try using FILTERGROUP. Basically you can set some fixed filters that way.
    Usage:
    FILTERGROUP := 2;
    SETRANGE(Hidden,FALSE);
    FILTERGROUP := 0;

    Now all filters you apply will be set in its own filter group. User trying to remove all filters will not be able to remove anything in FILTERGROUP = 2 though.
  • ichladilichladil Member Posts: 68
    Yes, it is the normal behaviour in RTC client that if the "lookup" form contains OnOpenPage trigger with some changes to filters then the initial filters are lost in dropdowns. It is not the case if the lookup is open as a separate page. See this blog for more details:
    http://www.kauffmann.nl/blog/index.php/2011/10/17/controlling-the-drop-down-list-in-the-roletailored-client/.

    Regards,
    Igor
  • absolutelyfreewebabsolutelyfreeweb Member Posts: 104
    tihomirjur, THAAAAANK YOUUUUUUUUUU you are my hero !!!

    even though getfitlers show up empty, it is in filtergroup 2, and it will add and not wipe it out...

    ichladil, it's a bug, you do the same thing in default filtergroup 0 and it wiptes it out... someone report this to MS!

    (bug only exists for flowfields)
Sign In or Register to comment.