URL Filters
The URL Filter (available for help items created for any M365 application) allows you to restrict a help item to only those pages that match the expression provided:
If you click on the URLs that begin with drop down, these are your options:
URLs that begin with, URLs that end with, URLs that contain, and URLs that do not contain are straightforward and self-explanatory. But what if you have a more complex situation? For example, let's say you want to have a Help item appear on every page of a Wikipage library named "oursites" except for a page called "externalusers".
This is where you will want to select the URLs that match the regex (regular expression) option. VisualSP uses Javascript Regex, which is a special text string for describing a search pattern. You can think of regular expressions as wildcards on steroids. In the example above, the regular expression to use is:
^(?=.*oursites)(?!.*externalusers).
If your situation is similar to the example above just copy and paste this regular expression into the URL Filter field in your environment and replace "oursites" and "externalusers" with whatever words that will correctly filter your Help item. Also, keep in mind that this regular expression is case sensitive.
Other RegEx Examples
To exclude a page (in this example, office.com), use this regex:
^((?!office.com).)*$
If you want to exclude more than one page you should add it all into one filter by adding the pipe icon "|", which means "or":
^((?!office.com|google.com).)*$
If you try to use multiple regex URL filters, they will cancel each other out.
Browser Filters
You also have the option to only show a help item based upon what browser the user is using (available for help items created for any M365 application). This can come in handy, for example, if corporate governance restricts what browsers are used. You can use the browser filter to display a warning if the user is using a non-approved browser.
The Browser Filters is right next to the URL Filters:
The help item will appear in every browser you add to the Browser Filter.
You have the option of selecting one of the named browsers in the drop down:
or, for advanced users, us a user agent string that matches a regex.
You can add multiple browsers to the filter.