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):
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?

(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