Weblink search options are fairly limited. One common issue I’ve run up against is when I want to allow a user to search for all possible values from a metadata drop-down. Weblink will treat a ‘blank’ value like “All” but does not offer that option for dropdowns. It is possible to accomplish this with a text field, but I don’t want users to have to guess what a proper selection might look like. Fortunately, there is a solution (verified in Weblink 11.0 and 10.4).
First, set up your Search Form. Make sure your dropdown field(s) are set with a Dropdown list, and the list is defined. Set your Query Results to “meet all constraints.”
For the next part, you will need access to the server. If you have it or can get it, find the xml file for the search page in question. Where exactly that is on the server may vary, but once you get to wherever your Weblink environment “lives,” the xml file will be under Custom -> searchforms -> (repository name).
Edit the file (using Administrator privileges) in your preferred text editor. Find the field that represents your dropdown, and simply prepend “<option></option>” to the beginning of the option list. Save.
Note – Adding a ‘blank’ row through the UI in your list definition will not work. The system will still assign the value as an empty string (‘value=””’), and will subsequently seek to find a specific match with that empty string. The only way to get a true blank value is by directly editing the xml file.
And one more thing – Editing the XML file needs to be your last step in setting up the search page. Any additional changes to made through the Weblink Designer UI can overwrite your edits, and you will have to add the blank option again.
Visual Aid: