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

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics NAV (Archived)

Create a custom filter for a page to be filtered

(0) ShareShare
ReportReport
Posted on by 2,582

Hi all.

I want to create a custom field for Amount where users can enter for eg: >1000, <1000,>=1200, etc. and the page should filter and give the respective records like if >1000 is entered then only the records having amount >1000 are displayed. This is already present in standard nav tables as shown below:

table-filter-image.PNG

I want to do the same functionality  in my customized page. Can anyone suggest how this can be done?

*This post is locked for comments

I have the same question (0)
  • mmv Profile Picture
    11,471 on at

    Do you mean that the custom field will hold values like ">1000", ">=1200" etc.?

  • Tina Menezes Profile Picture
    2,582 on at

    Yes. The user will enter values like these and the records should get filtered and be displayed accordingly.

  • mmv Profile Picture
    11,471 on at

    You may define those fields as Text type.  And when you filter, you need to add an Inverted Comma (') on both the sides of the values.

    E.g: while filtering '>1000'

  • Tina Menezes Profile Picture
    2,582 on at

    Hi,

    I have checked that. It is not working. I have created a text field 'Balance due text'. So the user will enter say >1000 as input for this field. Now with this input I want to filter customer ledger entries with 'Remaining Amount' > 1000. 'Balance due text' value can be anything like >10000, <=300000, <5000, etc. So if I enter the below expression in my code:

    CustLedgerEntryTable.SETFILTER("Remaining Amount",'%1',"Balance due text");

    The above line will give me error because Remaining amount is decimal field and Balance due text is text field. If I convert Balance due text to decimal using evaluate it again gives error because symbols like >,<,=, etc. cannot be converted to decimal. This is causing an issue and hence I am not able to filter values.

  • Verified answer
    mmv Profile Picture
    11,471 on at

    It works well.

    Try the below code:-

    CustLedgerEntryTable.SETFILTER("Remaining Amount","Balance due text");

  • Suggested answer
    Maneesha Profile Picture
    5,891 on at

    hi i have suggestion bu not sure if it is working for you or not

    How about using "Advance Filter' option to filter your requirement , then you can save it as your own

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics NAV (Archived)

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans