Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics NAV (Archived)

Different Results from Quick Filter and Added filter in NAV 2017 CU11

(0) ShareShare
ReportReport
Posted on by 1,305

I have a custom page based on a custom linked table in NAV 2017 CU11.  

If I set an Added filter I only get one record:

If I set a Quick Filter of the same value I get several records(expected result).

*This post is locked for comments

  • RobertasR Profile Picture
    5,002 on at
    RE: Different Results from Quick Filter and Added filter in NAV 2017 CU11

    Happy to have helped Dan!

  • Dan Eckhoff Profile Picture
    1,305 on at
    RE: Different Results from Quick Filter and Added filter in NAV 2017 CU11

    Well, I'll be...you're right!

    The next challenge was setting the record correctly.  SETRANGE doesn't work and I had to use SETFILTER instead to get the wildcards set.

    Thanks, Robertas

  • Verified answer
    RobertasR Profile Picture
    5,002 on at
    RE: Different Results from Quick Filter and Added filter in NAV 2017 CU11

    Please try following: put advanced filter '@*000011*'. Do you see the same entries as Quick Filter showed you? If you still see just one then I rest my case - there is something else wrong. If you see the same as with Quick Filter then go to the Customers list and put a Quick Filter on No. field '000011', or Advanced Filter '@*000011*'. How many customers do you see?

    Robertas

  • Dan Eckhoff Profile Picture
    1,305 on at
    RE: Different Results from Quick Filter and Added filter in NAV 2017 CU11

    I still don't think that's it...I've included the SQL view creation code.  The fields should be identical as both are originally derived from Sales Line before posting:

    CREATE VIEW [dbo].[Healy Awards$vSales Transactions]

    AS

    SELECT        dbo.[Healy Awards$Sales Invoice Line].[Sell-to Customer No_], 0 as [Document Type], dbo.[Healy Awards$Sales Invoice Line].[Document No_],

    dbo.[Healy Awards$Sales Invoice Line].Type, dbo.[Healy Awards$Sales Invoice Line].No_, dbo.[Healy Awards$Sales Invoice Line].Description,

                            dbo.[Healy Awards$Sales Invoice Line].[Description 2], dbo.[Healy Awards$Sales Invoice Line].Quantity, dbo.[Healy Awards$Sales Invoice Line].[Unit of Measure Code],

                            dbo.[Healy Awards$Sales Invoice Line].[Amount], dbo.[Healy Awards$Sales Invoice Header].[Posting Date]

    FROM            dbo.[Healy Awards$Sales Invoice Line] LEFT JOIN

                            dbo.[Healy Awards$Sales Invoice Header] ON dbo.[Healy Awards$Sales Invoice Line].[Document No_] = dbo.[Healy Awards$Sales Invoice Header].No_

    WHERE dbo.[Healy Awards$Sales Invoice Line].[Sell-to Customer No_]<>''

    UNION ALL

    SELECT        dbo.[Healy Awards$Sales Cr_Memo Line].[Sell-to Customer No_], 1 as [Document Type], dbo.[Healy Awards$Sales Cr_Memo Line].[Document No_],

    dbo.[Healy Awards$Sales Cr_Memo Line].Type, dbo.[Healy Awards$Sales Cr_Memo Line].No_, dbo.[Healy Awards$Sales Cr_Memo Line].Description,

                            dbo.[Healy Awards$Sales Cr_Memo Line].[Description 2], dbo.[Healy Awards$Sales Cr_Memo Line].Quantity, dbo.[Healy Awards$Sales Cr_Memo Line].[Unit of Measure Code],

                            dbo.[Healy Awards$Sales Cr_Memo Line].[Amount], dbo.[Healy Awards$Sales Cr_Memo Header].[Posting Date]

    FROM            dbo.[Healy Awards$Sales Cr_Memo Line] LEFT JOIN

                            dbo.[Healy Awards$Sales Cr_Memo Header] ON dbo.[Healy Awards$Sales Cr_Memo Line].[Document No_] = dbo.[Healy Awards$Sales Cr_Memo Header].No_

    WHERE dbo.[Healy Awards$Sales Cr_Memo Line].[Sell-to Customer No_]<>''

  • RobertasR Profile Picture
    5,002 on at
    RE: Different Results from Quick Filter and Added filter in NAV 2017 CU11

    Hi Dan, it is not THE answer, but I believe it leads you where to look :) If the Advanced Filter just gives you a single entry, and the Quick filter gives you several - most likely the Customer No field (which is NOT numerical - it's a string) in those additional entries has some hidden characters in it - a space, 'end of line' symbol etc. So I would question how the 'Sales Transaction' entries are created and whether there is a possibility to have hidden characters in it.

  • Dan Eckhoff Profile Picture
    1,305 on at
    RE: Different Results from Quick Filter and Added filter in NAV 2017 CU11

    The list page is developed on a linked table of a SQL view.  Am I getting strange behavior due to that?

    vSalesTransactions.RESET;

    vSalesTransactions.SETRANGE("Sell-to Customer No_","No.");

    IF vSalesTransactions.FINDSET THEN BEGIN

     CLEAR(vSalesTransactionsList);

     vSalesTransactionsList.SETTABLEVIEW(vSalesTransactions);

     vSalesTransactionsList.RUN;

    END;

  • Dan Eckhoff Profile Picture
    1,305 on at
    RE: Different Results from Quick Filter and Added filter in NAV 2017 CU11

    Robertas, this doesn't seem to be the answer.  In my example the filter is all numeric and the result sets for the expected outcome is homogenous for the filter (all are 000011).

  • RobertasR Profile Picture
    5,002 on at
    RE: Different Results from Quick Filter and Added filter in NAV 2017 CU11

    Hi Dan,

    those filters work differently. The Quick Filter applies '*' wildcards and is NOT case sensitive. Whereas Advanced filter works as-is, and is case-sensitive. For example, put 'sample' in the Quick Filter for Description field, and system will show all results that description contains word 'sample' regardless of lower-case or capital letter. The same search in Advanced filter would be '@*sample*' - here symbol '@' takes away the case-sensitive and '*' means that description can contain anything before or anything after word 'sample'.

    Hope that helps.

    Robertas

  • Dan Eckhoff Profile Picture
    1,305 on at
    RE: Different Results from Quick Filter and Added filter in NAV 2017 CU11

    Result using Added filter: Sell-to Customer No. = ‘000011’

    quickfilter.png

    Result using Quick filter with same value: Sell-to Customer No. = ‘000011’

    quickfilter.png

  • Dan Eckhoff Profile Picture
    1,305 on at
    RE: Different Results from Quick Filter and Added filter in NAV 2017 CU11

    Result using Added filter: Sell-to Customer No. = ‘000011’

    Result using Quick filter with same value: Sell-to Customer No. = ‘000011’

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

🌸 Community Spring Festival 2025 Challenge Winners! 🌸

Congratulations to all our community participants!

Adis Hodzic – Community Spotlight

We are honored to recognize Adis Hodzic as our May 2025 Community…

Kudos to the April Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard > Microsoft Dynamics NAV (Archived)

Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans