I'm attempting to apply a custom filter value to a search dialog in my application. To achieve this, I'm using the 'onSearchdialog' event on a specific property where the filter should be applied. However, I've encountered an issue where the filter value is not accessible within the 'onSearchdialog' method. This filter value needs to be dynamically set based on the selection made in a dropdown within a custom form. How can I pass this dynamic filter value to the 'onSearchdialog' method from an external JavaScript file that opens the search dialog?