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 :
Customer experience | Sales, Customer Insights,...
Unanswered

Set Default filter values and click 'Apply Filters' with JavaScript

(0) ShareShare
ReportReport
Posted on by 5

Hi all,

Newcomer to the Portals/Dynamics space here.

My question relates to using Custom JavaScript to set and apply filters for a List on a Portals page.

Context:

I have a list showing all of our Projects. Metadata filters are enabled and three Attribute Filters have been set up (all working as expected).

What I'm hoping to achieve is that of the three filters, the 'Status' filter will default to 'Active' and said filter will be applied when the page loads up.

I have used the following custom Jscript to try and achieve this (plus a plethora of similar alternatives that all boil down to essentially the same approach):

pastedimage1667489345362v3.png
The result is that the 'Status' dropdown does default to 'Active' (see image below), however the part of the function that should click the 'Apply Filters' button does not seem to work. Alternatively, perhaps this click happens too soon such that the table isn't fully loaded/ ready for the filters to be applied when the click goes off?

pastedimage1667488879793v2.png

(See above, Status filter set to 'Active' - however the list below has not been filtered; the 'Apply Filters' button still needs to be clicked manually, whereafter the list is filtered as expected)

Any advice as to the best way to achieve this would be great! Ultimately having the applicable filter set, displayed and applied as indicated above would be ideal.
Thanks!
JB
I have the same question (0)
  • SKPForYou Profile Picture
    on at

    Hi Jaybee91, Did you find a solution for this?

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 > Customer experience | Sales, Customer Insights, CRM

#1
Tom_Gioielli Profile Picture

Tom_Gioielli 83 Super User 2025 Season 2

#2
Gerardo Rentería García Profile Picture

Gerardo Rentería Ga... 49 Most Valuable Professional

#3
#ManoVerse Profile Picture

#ManoVerse 40

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans