Table Filter on Field on a Page fails

ASK_ITGASK_ITG Member Posts: 30
edited 2012-02-07 in NAV Three Tier
Hi,

I have made a page where one can make some events but when it runs a Table Filter fails.

The code:


The lookup:


The output:


The output should have a filter on the Product DS instead of 1 - which I think is the Fieldnumber for the Field Product.

Anyone seen this before?

It worked on my old XP-machine...

NOTE: it is NAV 2009 R2
/Allan

Answers

  • kinekine Member Posts: 12,562
    Are you sure that you have defined the OptionCaption on the field and not only the OptionString?
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
  • ASK_ITGASK_ITG Member Posts: 30
    Hi,

    That is not the problem, the problem is that the filter in Tablerelation doesn't work proberly.

    It looks like it is taking the Field No. (1) as the Filter instead og the actual value ('DS') of the Field...
    /Allan
  • kinekine Member Posts: 12,562
    Ah, sorry, I overlooked that it is FIELD() and not CONST() - thought that it is option field filtered for constant. Isn't there some code which will set this filter? May be the problem is somewhere else than you think...
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
  • ASK_ITGASK_ITG Member Posts: 30
    Hi,

    But this worked on my Win XP machine.. :x

    Can't see why this doesn't work. Have been looking at the hotfixes for my client, but can't see that this has been a problem that there has been made a hotfix for.
    /Allan
  • ASK_ITGASK_ITG Member Posts: 30
    Double-post
    /Allan
  • kinekine Member Posts: 12,562
    I think there must be some change. The logic will not change just because you reinstalled PC. If you are using latest client version, try to recompile the objects first, restart services etc. and test again...
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
  • mihail_kolevmihail_kolev Member Posts: 379
    "1" is probably the integer value of an option field

    EDIT: oops, ignore this

    EDIT2: Did you try to use simple code variable, not record variable for the field. This may be caused by the definition of the SubLedgEntryTemp."Price Code" field (maybe 1 is the first record in SubLedgEntryTemp table, the Product field or something.)

    In other words... maybe the table relation that you have written in the page is ignored and the lookup that you see is the set by the SubLedgEntryTemp record
    -Mihail- [MCTS]
  • ASK_ITGASK_ITG Member Posts: 30
    Hi,

    Have tried to change it to a variable but it makes no difference.
    /Allan
  • DjordjeDjordje Member Posts: 5
    Have you tried this hotfix:
    https://mbs2.microsoft.com/Knowledgebase/KBDisplay.aspx?scid=kb;EN-US;2548578
    The problem that you describe looks like the problem that was addressed with this hotfix.

    /Djordje
    /Djordje [MSFT]
  • ASK_ITGASK_ITG Member Posts: 30
    Hi Djordje

    That is exactly my problem - have tried to look at the hotfixes but must have missed that one.

    TY.
    /Allan
Sign In or Register to comment.