What is/are: Path Label Functions

Introduction

Path Labels are a feature of NSS that allow the creation of an organization-close analysis of file service usage. Instead of displaying UNC paths with growth statistics and usage numbers, organizations can create analyses that show growth by region, department or project - or historical usage by country, cost center or manager, etc.

A number of Knowledge Base articles are available that provide information on this topic. It is important to be aware of each:

  • Usage: Configure Path Labels [KB-3116]
  • Reference: Path Label Examples [KB-3141]
  • Reference: Path Label Functions (this article)

This article provides details of the functions that can be used in Path Label expressions. It is intended to be used as a reference while configuring Path Labels. It is recommended that both KB-3116 and KB-3141 be read before beginning to configure Path Labels in your environment.

Reference Table

Function Description Version Introduced
path.level(pathLevel)

 

Argument specifies which directory to return in a path. -1 specifies the last directory. 1 specifies the first directory. 0 is not a supported argument and will cause a ParserError.

 

9.61
path.lastdir()

 

Returns the last directory in a path. Equivalent to expression "path.level(-1)"

 

9.61
path.server()

 

Returns the server in a path. Equivalent to expression "path.level(1)"

 

9.61

path.share()

 

Returns the share in a path. Equivalent to expression "path.level(2)"

 

9.61
path.full()

 

Returns full path with no changes.

 

9.61SR1
ad.getuserprop(property, searchDomain, filterProperty,
filterValue)

 

Returns account properties from active directory. The first argument specifies which property to fetch, the second argument specifies which domain to search in (supports Global Catalog), the third argument specifies which property to filter on, the fourth argument specifies the filter value,  which may contain wildcards.

 

If there are multiple matches only the first is returned. If there is an error during the look-up of the property ###ERROR### will be returned.

 

9.61
ad.getgroupprop(property, searchDomain, filterProperty, filterValue)

 

Returns group properties from active directory. The first argument specifies which property to fetch, the second argument specifies which domain to search in (supports Global Catalog), the third argument specifies which property to filter on, the fourth argument specifies the filter value, which may contain wildcards.

 

If there are multiple matches only the first is returned. If there is an error during the look-up of the property ###ERROR### will be returned.

 

9.61
ad.getprop(property, protocolAndsearchDomain, propertyFilterValue)

 

Returns the property for a general active directory object. The first argument specifies which property to fetch, the second argument specifies which LDAP protocol path to use, the third argument specifies the filter value, which may contain wildcards.

 

If there are multiple matches only the first is returned. If there is an error during the look-up of the property ###ERROR### will be returned.

 

9.61
str.trimr(string)

 

Returns argument trimmed of white-space characters on the right side.

 

9.61
str.trimright(string)

 

Returns argument trimmed of white-space characters on the right side.

 

9.61
str.isequal(expr1, expr2, isCS)

 

Returns True if the first and second argument are equal. The third argument is optional and specifies if the comparison should be case-sensitive, default is case insensitive.

 

9.61
str.isless(string1, string2, isCS)

 

Returns True if the first argument comes before the second argument in a lexicographical order, otherwise False is returned. The third argument is optional and specifies if the comparison should be case-insensitive, default is case insensitive.

 

9.61
str.isgreater(string1, string2, isCS)

 

Returns True if the first argument comes after the second argument in a lexicographical order, otherwise False is returned. The third argument is optional and specifies if the comparison should be case-insensitive, default is case insensitive.

 

9.61
str.lower(string)

 

Returns the argument transformed into lowercase.

 

9.61
str.upper(string)

 

Returns the argument transformed into uppercase.

 

9.61
str.reverse(string)

 

Returns the argument transformed into reverse order.

 

9.61
rx.replace(string, regex, replaceString, isCS)

 

Returns the first argument, after replacing all matches by the regular expression specified in the second argument. The third argument specifies what to replace all matches with. The fourth argument is optional and specifies if the comparison should be case-insensitive, default is case-insensitive.

 

9.61
rx.contains(regex, string, isCS)

 

Returns true if the regular expression in the second argument finds a match in the first argument. The third is optional and specifies if the comparison should be case-insensitive, default is case-insensitive.

 

9.61SR2
not(expr)

 

Returns the inverse of a Boolean argument.

 

9.61
xor(expr1, expr2)

 

Returns the logical XOR result of two Boolean arguments. If both arguments are unequal then True is returned otherwise False is returned.

 

9.61
and(expr1,expr2)

 

Returns the logical AND result of two Boolean arguments. If both arguments are True then True is returned otherwise False is returned.

 

9.61
or(expr1,expr2)

 

Returns the logical OR result of two Boolean arguments. If either argument or both arguments are True then True is returned.

 

9.61
ifelse(expr, trueReturn, falseReturn)

 

If the first argument evaluates to true, then the second argument is returned, otherwise the third argument is returned.

 

9.61
date.current()

 

Returns the current date and time in the default system format.

 

9.8
date.add(dateString, number, timeUnit)

 

Adds or subtracts time to/from the first argument. If the second argument is a negative number, then the time unit is subtracted, otherwise it is added. The time unit can be "Years", "Months", "Days", "Hours", "Seconds", "Milliseconds" and "Ticks".

 

9.8
date.fromnumber(fileTime)

 

Converts a FILETIME value, such as the lastLogonTimestamp AD property, to a date string.

 

9.8
date.isequal(date1, date2)

 

Returns True if the two date/times are equal.

 

9.8
date.isless(date1, date2)

 

Returns True if the first date/time is less than the second.

 

9.8
date.isgreater(date1, date2)

 

Returns True if the first date/time is greater than the second.

 

9.8
date.min(date1, date2 [, ...n])

 

Returns the smallest (i.e. earliest) of the date/time arguments. Two or more arguments can be provided.

 

9.8
date.max(date1, date2 [, ...n])

 

Returns the largest (i.e. most recent) of the date/time arguments. Two or more arguments can be provided.

 

9.8
number.isequal(num1, num2)

 

Returns True if the two numbers are equal.

 

9.8
number.isless(num1, num2)

 

Returns True if the first number is less than the second.

 

9.8
number.isgreater(num1, num2)

 

Returns True if the first number is greater than the second.

 

9.8
number.min(num1, num2 [, ...n])

 

Returns the smallest of the numeric arguments. Two or more arguments can be provided.

 

9.8
number.max(num1, num2 [, ...n])

 

Returns the largest of the numeric arguments. Two or more arguments can be provided.

 

9.8
bit.and(num1, num2)

 

Returns the result of a bitwise AND operation. This can be used when e.g. checking the ACCOUNTDISABLE bit in the AD userAccountControl bit mask property. (Wikipedia offers a thorough explanation of bitwise operations here.)

 

9.8
bit.or(num1, num2)

 

Returns the result of a bitwise OR operation.

 

9.8
bit.xor(num1, num2)

 

Returns the result of a bitwise XOR operation.

 

9.8

ADDITIONAL RESOURCES

  • KB3116 How to: Configure Path Labels
  • KB3141 What is/are: Path Label Examples
  • KB Article: 3140

    Updated: 11/16/2016

    • Category
      • Reference
    • Affected versions
      • 9.61.18723.1502 [9.61]
      • 9.61.18853.1503 [9.61 SR1]
      • 9.61.18990.1505 [9.61 SR2]
      • 9.61.19180.1506 [9.61 SR3]
      • 9.61.19378.1509 [9.61 SR4]
      • 9.61.19529.1511 [9.61 SR5]
      • 9.61.19826.1603 [9.61 SR6]
      • NSS 9.7
      • NSS 9.8

    North America HQ

    NORTHERN Parklife, Inc.
    301Edgewater Place, Suite 100
    Wakefield, MA 01880
    USA

    Voice: 781.968.5424
    Fax: 781.968.5301

    salesUS@northern.net

     

    Additional Contact Information

    EMEA & APAC HQ

    NORTHERN Parklife AB
    St. Göransgatan 66
    112 33 Stockholm
    Sweden

    Voice: +46 8 457 50 00

    salesHQ@northern.net

    Northern Parklife



    ©2017 northern parklife

    privacy statement 
    terms of use