web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Small and medium business | Business Central, N...
Suggested Answer

NOT EQUALS IN A FILTER

(0) ShareShare
ReportReport
Posted on by 5
addafter(" ")
        {
            part("Produit"; "Produit")
            {
                ApplicationArea = all;
                SubPageView = where(Produit = filter(false));            
                SubPageLink = "No." = Field(Ref);
                Caption = 'Produit équivalent';
            }
        }
The No filter here is equals to Field(Ref), but i want all item not equals to field(Ref). I'm trying this one --> SubPageLink ="No." = FILTER (<>Field(Ref));
Which is not correct.

Thanks for your propositions
I have the same question (0)
  • Suggested answer
    Nitin Verma Profile Picture
    21,812 Moderator on at

    Hi,

    the correct syntax is as follows:

    SubPageLink ="No." = FILTER (<>Ref);

    but when you are using FILTER, you can not use any variable with it, instead it requires a hardcoded values with <> operator.

    In either way you can extend your open page trigger of sub page with the Header page values.

    Thanks.

  • Suggested answer
    YUN ZHU Profile Picture
    100,659 Super User 2026 Season 1 on at

    As Nitin mentioned, You can only use <> in Filter.

    pastedimage1661300865342v1.png

    If your needs are more complex, you can refer to Item Attributes Factbox (9110, ListPart), this Factbox is not associated with SubPageLink.

    Hopefully the link below can give you some hints.

    https://yzhums.com/25011/

    Thanks.

    ZHU

  • Mohamed Ali ELLOUZE Profile Picture
    5 on at

    Hi,

    Thanks for your request, I m testing with a variable named recNo = value of ref field, then i use

    "No." = FILTER(<> recNo)

    But the problem still exists

    Capture-d_1920E900_cran-2022_2D00_08_2D00_24-085149.png 

    The problem is resolved when i make "No." = FILTER(<> '21174') 

    There no way to have a variable ? 

  • Suggested answer
    IB-29041624-0 Profile Picture
    1,187 Moderator on at

    The filter value have to be a text so you should try use the use this command to format your filter value correctly when you have a variable that you want to be part of the filter

    something like FILTER =(STRSUBSTRNO('<>%1,recN);

    It can be smart to check the filter value in the debugger or in a message so you see that it is formatted correctly.

    docs.microsoft.com/.../text-strsubstno-method

  • Mohamed Ali ELLOUZE Profile Picture
    5 on at

    I'm trying this one: 

    "No." = FILTER(StrSubstNo('<> %1', recNo) )

    Capture-d_1920E900_cran-2022_2D00_08_2D00_24-092459.png

    Then I declared a new Text var : 

     myText := StrSubstNo('<>%1', recNo);
    And i do like this : 
    "No." = FILTER(myText) --> always wrong
    although when i check the myText value in a message it's OK --> 
    Capture-d_1920E900_cran-2022_2D00_08_2D00_24-091820.png
  • Suggested answer
    IB-29041624-0 Profile Picture
    1,187 Moderator on at

    I think you set your filter incorrectlty.

    You should say rec.setfilter("No.",myText);

    SETFILTER Function (Record) - Dynamics NAV | Microsoft Docs

  • Mohamed Ali ELLOUZE Profile Picture
    5 on at

    I can't do setfilter in this context, i would like to do this filter in the subpagelink.

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the April Top 10 Community Leaders

These are the community rock stars!

Leaderboard > Small and medium business | Business Central, NAV, RMS

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 1,872 Super User 2026 Season 1

#2
YUN ZHU Profile Picture

YUN ZHU 1,110 Super User 2026 Season 1

#3
AndrewThomas81 Profile Picture

AndrewThomas81 892

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans