Using the URL Filter – VSP On-Prem

Applies to: VisualSP On-Premises
Print Friendly, PDF & Email

In the creation of Help items, you are able to control where the Help item appears by limiting its scope. There are pre-defined scopes available in the Help Tab Scope section of the Manage Help Items page: Site Settings -> Manage VisualSP Help Items -> <Title of Help item>

You can accomplish the same thing using a URL Defined Scope:

For example, to display the Help item on every page of a Wikipage library called “oursites” you would put /oursites in the URL Defined Scope field.

But what if you have a more complex situation? Let’s say you still  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 the ability to use a regular expression, or regex, comes in handy.  VisualSP uses Javascript Regex. A regular expression is a special text string for describing a search pattern. You can think of regular expressions as wildcards on steroids.

In our example, the regular expression to use is:

^(?=.*oursites)(?!.*externalusers).*

See how it works here.

If your situation is similar to the example above just copy and paste this regular expression into the URL Defined Scope 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.

To exclude a page (in this example, office.com), use this regex:

^((?!office.com).)*$

Updated on May 16, 2019

Related Articles