You will need to negate the filter itself. I think that it will be no simple task. Question is, why you need that? Isn't the problem somewhere else? Could you solve it by another way?
the idea is the user will entered 1000 or 2000 or 1000&2000 or 1000..2000 for first part i will make this filter SETFILTER("No.",(filter entered by user));
for calc some total ,then i need to make this filter SETFILTER("No.",<>(filter entered by user));
to calc another total,that's the point. :?:
What about not to filter, calc the total and subtract the first total?
I completely agree with Kine. Calculate your totals, once with the filters applied and once with no filters. The difference is the filters with the NOT at the beginning.
I agree too with kine, but i steel have poblem :
onlookup (total calcul)
IF FORM.RUNMODAL(FORM::"Item List",recItem) = ACTION::LookupOK THEN
VALIDATE("No.",recItem.No.);
i need to applie the filter with "recItem"
Comments
Are you trying to "negate" the filter by code?
SETFILTER("No.",'<>%1',textvar);
MVP - Dynamics NAV
My BLOG
NAVERTICA a.s.
SETFILTER("No.",(filter entered by user));
for calc some total ,then i need to make this filter
SETFILTER("No.",<>(filter entered by user));
to calc another total,that's the point. :?:
A = B + C => C = A - B
MVP - Dynamics NAV
My BLOG
NAVERTICA a.s.
Remember, that actually equals (A <> AND (A <> C).
Anyway, this is not a trivial task. Your users might not enter a filter like this:
((<>1000&<>2000)OR(<>3000&<>4000)) AND NOT (=2000 OR =5000)
but what if they do. Do you really want to build a function to parse parentheses and properly negate everything?
I completely agree with Kine. Calculate your totals, once with the filters applied and once with no filters. The difference is the filters with the NOT at the beginning.
My Blog - nav.education
onlookup (total calcul)
IF FORM.RUNMODAL(FORM::"Item List",recItem) = ACTION::LookupOK THEN
VALIDATE("No.",recItem.No.);
i need to applie the filter with "recItem"
Mark all record. Apply filter, unmark filtered records. Clear the filter, filter only on marked records. You are done.
!!!Once again - think about the performance, you need to read ALL records in this solution!!!
MVP - Dynamics NAV
My BLOG
NAVERTICA a.s.
MVP - Dynamics NAV
My BLOG
NAVERTICA a.s.