Problem with persisting Field Filter

davidecdavidec Member Posts: 63
Hello!
I've searched this forum and the Internet, but couldn't find a solution to a problem one of our customers has.

As far as she told me, this girl opened the (purchased) posted invoices, set a field filter on the customer, did what she needed to, then after she closed the form, did some other routine work. At last she returned to the posted invoices and the form preserved the previously entered filter! If she presses F5, she still sees just the filtered rows, so she always has explicitly clear it!
I tried to explicitly remove/change the filter, it worked until I closed the form, then when I reopened it, the old filter was there again! I thought it was due to something done during her learning phase, so I just removed the .zup file. Everything worked fine for a week or so, but now the problem has reappered!
The same happens when she opens the Sales posted invoices form. She's the only one in her group to face this issue, but actually the computers are quite heterogeneous.

Technical details: NAV 5 SP1 (Italian version), native DB. Client runs on a Win XP SP2, 2002 version.

Did anyone face this problem? I've no clues as to what to check for, does any of you have any suggestions?? :|

Thanks in advance!

Comments

  • David_SingletonDavid_Singleton Member Posts: 5,479
    Filters are stored at the FORM level, not at the table level. this is a common mistake made by some users (well to phrase this correctly "This is a major short coming of the training give by some Navision teachers :mrgreen: )

    Probably what is happening is that she is putting the filter on the Sales invoice CARD, but removing it from the sale invoice LIST.

    She needs to remove the filter from the form where she actually added it.

    If this is the case, then talk to the person that did her training, and tell them to get back and redo the training.
    David Singleton
  • davidecdavidec Member Posts: 63
    Hi, thanks for the reply: I tried what you said, but it didn't solve anything. Actually, the behaviour I've always seen with these filters (field filters, not flow filters) is that they never persist at all. So it's strange that when after the form is closed, some filter is persisted... This never happens on other machines...
    Or am I missing something? Which is likely...
  • David_SingletonDavid_Singleton Member Posts: 5,479
    davidec wrote:
    Hi, thanks for the reply: I tried what you said, but it didn't solve anything. Actually, the behaviour I've always seen with these filters (field filters, not flow filters) is that they never persist at all. So it's strange that when after the form is closed, some filter is persisted... This never happens on other machines...
    Or am I missing something? Which is likely...

    Filters shoudl always persist, so I guess you are right. :mrgreen:

    you are going to need to investigate this, maybe see if someone has added code to do something wierd.
    David Singleton
  • kapamaroukapamarou Member Posts: 1,152
    On some forms (Like Posted Purchase Invoices) there code on OnAfterGetRecord that clears the"No." filter.. (Not other filters). So the "No." Filter will not be preserved... Have you checked the code on the form?
  • ayhan06ayhan06 Member Posts: 210
    kapamarou wrote:
    On some forms (Like Posted Purchase Invoices) there code on OnAfterGetRecord that clears the"No." filter.. (Not other filters). So the "No." Filter will not be preserved... Have you checked the code on the form?

    may be, permission filter has been set for that girl.
  • davidecdavidec Member Posts: 63
    Hello again!
    I'm the only one who could have changed the code, and I did not! And indeed the same NAV Db works fine for the other people using it...
    Yes, I checked the code and the SETRANGE("No.") is actually run: I debugged the code and everything seemed bound to turn out fine... It did not!

    David, what do you mean by "Filters shoudl always persist, so I guess you are right"? Am I getting it the other way round or field filters should never persist???

    I think I'll try to reinstall the client on that girl's machine and wait if I can't work anything out...

    Thanks again!

    PS: I forgot to mention: one fieldfilter is persisted, but if this is the correct behaviour, how come that if I try to overwrite it, the latter is not persisted and the next time I open the form, I find the first, "overwritten", filter?

    I mean, suppose the girl sets a filter, (which I call A in this post), for field "Description", set to value "Microsoft". This is what happens on that girl's client:

    The girl opens the posted invoices form and find rows filtered by filter A.

    The girl wants to see only records with "Description" of value "Oracle", so she sets a new filter, filter B, to this value.

    The right records are retrieved and examined by the girl, who then closes the form. So filter B is persisted.

    She opens the form again, and finds records with description "Microsoft", so filter A is applied!!!! :|

    Then she wants to clear the filter, deleting the value from the textbox (filter C).

    The right records are retrieved and examined by the girl, who then closes the form. So filter C is persisted.

    She opens the form again, and finds records with description "Microsoft", so filter A is applied!!!! :|

    I can't figure how this can be the right behaviour!

    PPS: The filter values used in the example are fictitious: it's not that Microsoft chose to show herself rather than Oracle... :D
  • davidecdavidec Member Posts: 63
    Just for completion, I post a reply to David here: I misunderstood your first post! I managed to reconstruct the "problem" on my machine. The girl actually did what she denied (and still denies!) to do: she must have applied the filter from the card view, then opened the list view and went on applying filters there... In that case field filters are indeed preserved at card level, so when she later reopens the card, she still finds the filter, goes to the list, finds the filter and removes it and so on...

    That was interesting to learn, as a developer I never met this feature... :)

    Thank you very much David!!
  • David_SingletonDavid_Singleton Member Posts: 5,479
    davidec wrote:
    Just for completion, I post a reply to David here: I misunderstood your first post! I managed to reconstruct the "problem" on my machine. The girl actually did what she denied (and still denies!) to do: she must have applied the filter from the card view, then opened the list view and went on applying filters there... In that case field filters are indeed preserved at card level, so when she later reopens the card, she still finds the filter, goes to the list, finds the filter and removes it and so on...

    That was interesting to learn, as a developer I never met this feature... :)

    Thank you very much David!!

    You are welcome. I have seen this situation so often, I was quite sure that this was what was happening.

    Still my first post stands, you need to find the trainer, and tell them to go and get trained before doing any more training,. This is really basic Navision, and every user needs to be taught this from day one.

    Great to see its fixed, even if it was quite a challenge.
    David Singleton
Sign In or Register to comment.