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

Community site session details

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

How to apply a custom filter on a custom page?

(0) ShareShare
ReportReport
Posted on by 607

Hi All,

I have created a custom page,on top of that page i have added an unbounded date field, on the basis its value it fetches records from the standard table and inserts them into a custom table, which shown in the grid of the same page. Now what happens is on the basis of the date value selected, i want filter the page grid with only those record whose value matches that of date value?

How can i achieve this?

Thanks in Advance.

I have the same question (0)
  • Suggested answer
    LewisH95 Profile Picture
    65 on at
    RE: How to apply a custom filter on a custom page?

    To get started with Custom Filters,

    Open the Add menu (Add) for the page and expand the Widgets section.

    From the Search section, drag a Custom Filter onto the page.

    Custom filters can do so many things, it’s impossible to list them all. What follows is a widget configuration tour. Separate documentation will be written to provide a how-to demonstration of Custom Filters.

    Custom Filter Configuration Options

    Open the widget Options menu (Options) and click Configuration.

    Filter Field (text)

    Most often, filters operate on a specific field. Set the name of the indexed field to be filtered (for example, title). You won’t need this if the Filter Query Type is set to a type that doesn’t require a field, such as Regexp.

    Filter Value (text)

    For most filters, you must enter text value here that specifies the text to apply the filter on in the specified field (for example, set a Match query to the next street on the title_en_US field). Some Filter Query Types require special notation, as in the case of the Regexp filter.

    Filter Query Type (select list)

    Select the query type to filter the results by. Available types include Bool, Exists, Fuzzy, Match, Match Phrase, Match Phrase Prefix, Multi-Match, Prefix, Query String, Regexp, Script, Simple Query String, Term, Wildcard. To learn more about these queries, visit the Elasticsearch documentation.

    Set the occurrence type for the query being contributed to the search. Options include Filter, must, must_not, and should. To understand each type, see the Elasticsearch documentation.

    Set the name of the contributed query. This is unnecessary unless this filter acts as a parent query to another filter that contributes to child clauses; in that case, set this filter’s Query Name as the child filter’s Parent Query Name. This parent/child behavior is only available for filters of type Bool.

    When contributing a child clause to a bool query, set this to match the Query Name configured in the parent Custom Filter widget. Otherwise, leave it blank.

    Boost the score of the results matching this query. Specify any whole or decimal number here that makes sense. If you always want results matching this at the top, set the Boost value really high (e.g., 1000).

    Enter the heading to display for this filter. If not set, the Filter Field’s value is displayed.

    Custom Parameter Name (text)

    Specify a URL parameter name for the filter. If not set, the Filter Field’s value is used.

    If checked, the widget is invisible to regular users. The Filter Value from the configuration is applied by default, but users can still filter for other values via URL Parameter. Don’t worry, you can shut that down if you need to with the Immutable setting (see below).

    Enable this to ensure that the Filter Value cannot be changed by regular users. The widget becomes invisible to them and filter values set via URL parameters are not accepted. The Filter Value set in the widget configuration is applied at all times (unless it’s disabled).

    If checked, the query is ignored and doesn’t participate in searches. This gives you a quick way to stop the filter, but keep the configuration so it can be re-enabled later.

    Federated Search Key (text)

    Enter the key of an alternate Search this widget is participating on. If it’s set, be aware that the default Liferay Portal index isn’t searched at all. If not set, this widget participates in the default search. Values in this field typically match the name of an application-defined index.

    There are many use cases you can satisfy by incorporating Custom Filters into your search page. Two demonstrative articles are planned to show you some of the filtering capabilities at your disposal:

    Refine to One (or Needle in a Haystack) will show you how to add user-operated filters to the page so results can be refined down to just the result they were looking for.

    Complex filtering shows you some more advanced filters and how they work.

    Check out the Custom Filter and see what it adds to your search page.

  • AXBOY Profile Picture
    607 on at
    RE: How to apply a custom filter on a custom page?

    Cant we achieve this through code?

  • Community Member Profile Picture
    on at
    RE: How to apply a custom filter on a custom page?

    Try to pass the date value to the sub page/grid then called CurrPage.update(false) to refresh the page.

  • AXBOY Profile Picture
    607 on at
    RE: How to apply a custom filter on a custom page?

    can u pls let me know how can i pass that value?

  • Suggested answer
    Marco Mels Profile Picture
    on at
    RE: How to apply a custom filter on a custom page?

    Hello,

    We currently do not have dedicated Dev support via the Dynamics 365 Business Central forums, but I wanted to provide you some additional resources to assist.  If you need assistance with debugging or coding I would recommend discussing this on one of our communities.

    www.yammer.com/dynamicsnavdev

    dynamicsuser.net/.../developers

    I will open this up to the community in case they have something to add.

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 > Small and medium business | Business Central, NAV, RMS

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 3,377

#2
Jainam M. Kothari Profile Picture

Jainam M. Kothari 2,696 Super User 2025 Season 2

#3
YUN ZHU Profile Picture

YUN ZHU 1,512 Super User 2025 Season 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans