combine filters

dolec
dolec Member Posts: 12
Hi,

is there any way to combine filters in c/side?

I've got two records AccScheduleLine1 and AccScheduleLine2, both are filtered. I want use both the filter sets in the AccScheduleLine1 record.

I think the COPYFILTERS function cleans all the previous filters in all filtergroups and copy the new filters only.

Comments

  • kine
    kine Member Posts: 12,562
    You can use the function GETVIEW and SETVIEW (it takes only active filtergroup) - there is only one problem - it sets CURRENTKEY too...

    Second variant is to copy field by field...
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
  • jm
    jm Member Posts: 156
    hi,

    Yes, you are right,
    "COPYFILTERS function cleans all the previous filters in all filtergroups and copy the new filters only."

    the only way to combine filters is to use a temporary table if you knew that there are only a few records (<100) filtered by the first filter.
    - filter the first filter set on the original table
    - insert the filtered records in a temporary table
    - filter the first filter set on the temporary table

    but can you tell us what you want to do?
    may be you don't need combine filtters?

    br
    Josef Metz
    br
    Josef Metz
  • kine
    kine Member Posts: 12,562
    Third variant:

    Apply first filter, make marks on all records,
    Apply second filter, make marks on all records,
    Clear filters, turn markedonly...
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
  • Urmas
    Urmas Member Posts: 76
    It depends a bit what you mean by "combining" the filters.
    If you mean a logical AND then the filtergroups should be the most handy solution. If it is OR, you most likely have to use temporary table or marking the records.