Reference - Modifiers

TSL Ping Tree > Reference

Reference - Modifiers

Modifiers are used in Field configurations to have the initial inbound String-based values of fields scrubbed when processing a form submission.  Modifiers are also used in the Token Substitution expressions that are common to many different configuration items such as Interface parameter mappings, Field Validations, Filters, Promotion Pixels, and URLs such as those used with Lead Points, Ping Trees, and Promotions.
 

For example, to scrub the value of a Field called "Loan Amount Requested" on input go to the Field configuration page, select that field, and then enter one or more String-based Modifiers.  A good choice for a monetary figure like "Loan Amount Requested" is "NumericOnly" which removes all but digits, commas, and periods.  For example if a raw input for this field were "$1,520.76 USD" then the Modifier would turn the value into "1,520.76" which can be cast into a Decimal data type under the "en-US" and "en-GB" cultures as the value 1,520.76.

For an example with Token Substitution expressions say that "Loan Amount Requested" is to be mapped to a potential lead buyer and their rule for this parameter is to only send multiples of 100 in the range of 100.00 to 1,500.00 inclusive.  Go to the Interface configuration page and enter the lead buyer's parameter name for the "Loan Amount Requested" field, say "LoanAmount".  Using the Expression Builder select field "Loan Amount Requested" and before inserting it into the text block select a series of Modifiers that will work for this scenario.  One way is to use "NearestCeiling(100) Min(100) Max(1500)".  The first Modifier rounds the number up to the nearest multiple of 100.  The second Modifier ensures a minimum value of 100.  The third Modifier ensures a maximum value of 1,500.  So for example a value of 1,520.76 will be modified before posting to become "1500.76" (if no custom format is specified via the Format modifier as the last modifier).


Modifiers are evaluated from left to right.  Operator names are not case sensitive.

Modifiers can only be chained together if the IN and OUT data types match.  So for example "TotalMonths" can be used to turn a DateTime value into an Integer.  After using "TotalMonths" it is OK to use an Integer based modifier such as "Nearest(6)"

Literal Numeric modifier arguments are cast from Strings to numbers using the "en-US" culture.  Since commas are used to separate arguments then this means that the only valid characters for expressing a literal numeric argument value are digits, an optional "." to indicate a decimal point, and an optional "-" in front of the number to indicate a negative value.

Likewise literal DateTime modifier arguments are cast using the "en-US" culture.  We recommend using the format "yyyy-MM-dd" (year, month, day) to avoid ambiguity since this works with all cultures that use the Gregorian calendar.

String arguments are enclosed in single quotes.  If an embedded single quote is needed then use two back-to-back single quotes, e.g. 'Johny''s Pizza' will produce the String value "Johny's Pizza".

With a few documented exceptions it is valid to use a Token Substitution expression as the argument to a Modifier.  For example the Token Substitution expression "${f.'Home Phone' default(${f.'Cell Phone'})}" is a valid way to map to a home phone number but if that is not available then map to the cell phone.  Nesting is unlimited so for example this is a valid way to map to the work phone number if both the home and cell phone numbers are not available: "${f.'Home Phone' default(${f.'Cell Phone' default(${f.'Work Phone'})})}"

 

Available Modifiers

Name Data Type In Data Type Out Description
Abs Numeric Numeric Returns the absolute value, e.g. "-15" becomes "15" and "-15.75" becomes "15.75".
Add(N) Numeric Numeric Adds N to the current Decimal or Integer value.  See also Subtract, Multiply, Divide, and Remainder.
AddLeadingSpace String String Precedes the given string with a space if the string is not blank.  Good for connecting street address lines 1 and 2 into a single street address, e.g.
AddDays(N) DateTime DateTime Adds N days; to subtract use a negative value.  The fractional part of N is the fractional part of a day rounded to the nearest millisecond.  For example, 4.5 is equivalent to 4 days, 12 hours, 0 minutes, 0 seconds, and 0 milliseconds.
AddHours(N) DateTime DateTime Adds N days; to subtract use a negative value.  The fractional part of N is the fractional part of an hour rounded to the nearest millisecond.  For example, 4.5 is equivalent to 4 hours, 30 minutes, 0 seconds, and 0 milliseconds.
AddMinutes(N) DateTime DateTime Adds N days; to subtract use a negative value.  The fractional part of N is the fractional part of a minute rounded to the nearest millisecond.  For example, 4.5 is equivalent to 4 minutes, 30 seconds, and 0 milliseconds.
AddMonths(N) DateTime DateTime Adds N months (integer N only); to subtract use a negative value.  Takes into account leap years and the number of days in a month.  For example, adding 1 month to March 31 will produce April 30.
AddSeconds(N) DateTime DateTime Adds N days; to subtract use a negative value.  The fractional part of N is the fractional part of a second rounded to the nearest millisecond.  For example, 4.5 is equivalent to 4 seconds and 500 milliseconds.
AddYears(N) DateTime DateTime Adds N years (integer N only); to subtract use a negative value.  Takes into account leap years.  For example, adding 1 year to February 29, 2012 will produce February 28, 2013.
AlphaNumericOnly String String Strips away any character that is not between a-z, A-Z, or 0-9.
AlphaOnly String String Strips away any character that is not between a-z or A-Z.
Append(string) String String Appends the specified string value.  See also Prepend(string).
CheckABA(option) String or Integer CheckBox Returns True if the current integer or the "DigitsOnly" version of the current string is 9 digits long and valid for a US American Bankers Association (ABA) number.  Option is 'format' (the default) which validates the format of the number based on it being 9 digits and passing a check-sum validation.
CheckEmail(option)
String CheckBox Does a format check to see if the email address appears valid. This modifier does not do domain validation--use CheckMX for that. Available options are:

normal - this is a very strict check that does not allow unicode characters, nor comments, nor display names. Any characters that are allowed only with restrictions are not considered valid. See "Local part" section of this article for more details.
CheckMX String CheckBox Does an MX record check against the current string.  String must be in valid email address format where an @ sign properly separates the local address part from the domain.
CheckPhoneUK(regions) String CheckBox Returns True if the phone number is valid for the specified regions.  By default all regions are valid.  Regions are: geographic, nationwide, corporate, personal, mobile, freephone, premiumrate.  Example: CheckPhoneUK('personal','mobile')
CheckPhoneUS String or Integer CheckBox Returns True if the number is 10 digits long and it is prefixed by a valid NPA/NXX combination per the the North American Numbering Plan Administration.  When used against a string the string must already be in "DigitsOnly" format.  Also invalidates the 555 exchange and non-geographic area code e.g. 800, 888, and 900.
CheckRegEx(pattern) String CheckBox Runs a case-insensitive Regular Expression (in Microsoft Regular Expression syntax) against the current string.
CheckSSN String or Integer CheckBox Returns True if the current integer with leading zeroes added to make it 9 digits long, or the "DigitsOnly" version of the current string, is 9 digits long and valid for a US Social Security Number per rules published by the US Social Security Administration.  Also invalidates a handful of frequently abused numbers e.g. 078-05-1120 which was used as a sample number in a 1938 wallet.
Chr(N) String String Adds a character with the ASCII code N to the output, e.g. chr(33) becomes the ! character.
DayOfWeek DateTime String Returns string representation of the day of the week of the date. This would be one of the following: Sunday, Monday, Tuesday, Wednesday, Thursday, Friday, Saturday.
Default(string) n/a n/a If the value being modified winds up becoming the empty string for any reason then this modifier will supply the string value to use in its place.  It does not matter where in a modifier chain this modifier is placed other than if it is accidentally specified more than once then only the last one will be honored.  It is perfectly valid to use a Token Expression as its value, e.g. "${f.'Home Phone' default(${f.'Cell Phone'})}" is a valid way to map to a home phone number but if that is not available then map to the cell phone.
DiffDays
DiffDays(DateTimeValue)
DateTime Integer Returns the Integer difference of full days between the current DateTime value and the specified DateTimeValue (which defaults to the current Date and Time in the UTC time zone).  The DateTimeValue can either be a string in the format 'yyyy-MM-dd' or 'yyyy-MM-dd HH:mm:ss' or it can be a ${} token that results in a String of that format.  When the current DateTime value is earlier than the specified DateTimeValue, or when no arguments are supplied, the resulting value will be a positive number or zero.  Takes into account leap years and the number of days in a month.
DiffHours
DiffHours(DateTimeValue)
DateTime Integer Returns the Integer difference of full hours between the current DateTime value and the specified DateTimeValue (which defaults to the current Date and Time in the UTC time zone).  The DateTimeValue can either be a string in the format 'yyyy-MM-dd' or 'yyyy-MM-dd HH:mm:ss' or it can be a ${} token that results in a String of that format.  When the current DateTime value is earlier than the specified DateTimeValue, or when no arguments are supplied, the resulting value will be a positive number or zero.  Takes into account leap years and the number of days in a month.
DiffMinutes
DiffMinutes(DateTimeValue)
DateTime Integer Returns the Integer difference of full minutes between the current DateTime value and the specified DateTimeValue (which defaults to the current Date and Time in the UTC time zone).  The DateTimeValue can either be a string in the format 'yyyy-MM-dd' or 'yyyy-MM-dd HH:mm:ss' or it can be a ${} token that results in a String of that format.  When the current DateTime value is earlier than the specified DateTimeValue, or when no arguments are supplied, the resulting value will be a positive number or zero.  Takes into account leap years and the number of days in a month.
DiffMonths
DiffMonths(DateTimeValue)
DateTime Integer Returns the Integer difference of full months between the current DateTime value and the specified DateTimeValue (which defaults to the current Date and Time in the UTC time zone).  The DateTimeValue can either be a string in the format 'yyyy-MM-dd' or 'yyyy-MM-dd HH:mm:ss' or it can be a ${} token that results in a String of that format.  When the current DateTime value is earlier than the specified DateTimeValue, or when no arguments are supplied, the resulting value will be a positive number or zero.  Takes into account leap years and the number of days in a month.  For example, DiffMonths with a current DateTime value of March 31, 2012 and a specified DateTimeValue of April 30, 2013 will produce 1.
DiffSeconds
DiffSeconds(DateTimeValue)
DateTime Integer Returns the Integer difference of full seconds between the current DateTime value and the specified DateTimeValue (which defaults to the current Date and Time in the UTC time zone).  The DateTimeValue can either be a string in the format 'yyyy-MM-dd' or 'yyyy-MM-dd HH:mm:ss' or it can be a ${} token that results in a String of that format.  When the current DateTime value is earlier than the specified DateTimeValue, or when no arguments are supplied, the resulting value will be a positive number or zero.  Takes into account leap years and the number of days in a month.
DiffYears
DiffYears(DateTimeValue)
DateTime Integer Returns the Integer difference of full years between the current DateTime value and the specified DateTimeValue (which defaults to the current Date and Time in the UTC time zone).  The DateTimeValue can either be a string in the format 'yyyy-MM-dd' or 'yyyy-MM-dd HH:mm:ss' or it can be a ${} token that results in a String of that format.  When the current DateTime value is earlier than the specified DateTimeValue, or when no arguments are supplied, the resulting value will be a positive number or zero.  Takes into account leap years and the number of days in a month.  For example, DiffYears with a current DateTime value of February 29, 2012 and a specified DateTimeValue of February 28, 2013 will produce 1.
DigitsOnly String String Strips away any character that is not between 0-9.  DO NOT USE IF INPUT MAY INCLUDE PLACES PAST THE DECIMAL POINT!  For example '$12.25' will become '1225'; use "NumericOnly" in such cases to instead get '12.25'.
Divide(N) Numeric Numeric Divides the current Decimal or Integer value by N.  See also Add, Subtract, Multiply, and Remainder.
FirstWord String String Returns the first word.  For example the string "James Earl Jones" becomes "James".
FirstWords String String Returns every word except the last word.  For example the string "James Earl Jones" becomes "James Earl".
Format(Specifier)
Format(Specifier,Culture)
Non-String String Formats the given non-string value into a string.  Default Culture is 'en-US'.  For example format('F2') will format a Decimal value to show two places past the decimal point; e.g. 2.5 becomes the String "2.50".  For more about formatting see Reference - Format Specifiers and Cultures.
FullYears
FullYears(N)
FullYears(N,method)
DateTime Integer Returns the difference in full years between the given DateTime and Now in the US Eastern Standard Time time zone.   To consider the starting DateTime value as UTC time use the timezone modifier first; any time zone will work.  For any other time zones please contact us as we know that we must expand the functionality of this function to support other time zones, however, at the granularity of a year it probably does not matter.

The result is a positive number (or zero) for a DateTime that is prior to Now.  The result is a negative number (or zero) for a DateTime that is after Now.

Optional argument N rounds the number to its nearest multiple of N.  For example if the difference is 7 and N=6 it returns 6.  If the difference is 11 and N=6 it returns 12.

Optional argument method defines the rounding method to be used.  Methods are floor, ceiling, or round.  Modifier fullyears(N) is equivalent to fullyears(N,round).  Token Substitution expressions are not permitted for the method argument.

For example if the method is floor and the difference is 7 while N=6 it returns 6; if the difference is 11 while N=6 it also returns 6.

If the method is ceiling and the difference is 7 while N=6 it returns 12; if the difference is 11 while N=6 it also returns 12.
IpInfo(Option) IpAddress String Option is a string that tells what information item to return about an IP address. The options are:
  • CountryCode - This returns the 2 character country, such as US for the United States and GB is the United Kingdom.
  • CountryName - This returns the text name of the country in all uppercase.
  • Region - this returns the state for USA IP addresses
  • City - this returns the city name if available
If values are not available for a given IP address, a dash ("-") will be returned.
IsWeekend DateTime Checkbox Returns True if the date falls on a Saturday or Sunday
IsWeekday DateTime Checkbox Returns True if the date falls on a Monday through Friday
LastWord String String Returns the last word.  For example the string "James Earl Jones" becomes "Jones".
LastWords String String Returns every word except the first word.  For example the string "James Earl Jones" becomes "Earl Jones".
Left(N) String String Returns the leftmost N characters.
Length String Integer Returns the length of the current string.
Lower
LCase
String String Converts the string to lowercase.
LTrim String String Trims leading spaces.
MapNumber(LowerBound1, UpperBound1, String1, LowerBound2, UpperBound2, String2, ..., Default) Numeric String Maps the current Decimal or Integer value into a String value according to the specified range mappings.

If no match if found then the required Default string is used.

For example consider a Field called "Net Monthly Income" with a current value of 4,500.00.

MapNumber(-9999,0,'none',0,2000,'not-enough',2000,4000,'fair',4000-5000,'good','excellent') will produce 'good'.

If any ranges overlap then the first one found to match the current value wins.

Tip: To map a DateTime to a String based on the relative difference between now and that DateTime value use one of the available "DateDiff" style modifiers such as totalmonths first and then map that value using mapnumber.
MapString(lhSide1, rhSide1, lhSide2, rhSide2, ..., Default) String String Maps the current String value into a different String value according to the specified left-hand/right-hand pairs.  This is especially useful for String Enumeration data items.

If no match if found then the optional Default string is used.  If no Default is specified then the original String value remains as-is.

For example consider a Field called "Gender" with a current String value of "O".

MapString('F','Female','M','Male','Other') will produce 'Other'.

MapString('F','Female','M','Male') will leave the value as-is: 'O'.

In either case if the original value had been 'F' then both mappings would have produced 'Female'.
Max(N) Numeric Numeric Limits the maximum value to the specified number.
Mid(N,M) String String Returns M characters starting at position N (1 based).  For example "Mid(3,2)" on string "12345678" returns "34".
Min(N) Numeric Numeric Limits the minimum value to the specified number.
Multiply(N) Numeric Numeric Multiplies the current Decimal or Integer value by N.  See also Add, Subtract, Divide, and Remainder.
Nearest(N) Numeric Integer Turns the number into the nearest integer number that is evenly divisible by N.  For example if the value is 155 and N=50 it returns 150.  If the value is 175 and N=50 it returns 200.
NearestCeiling(N) Numeric Integer Turns the number into the nearest integer number that is evenly divisible by N and larger than the number.  For example if the value is 155 and N=50 it returns 200.  If the value is 201 and N=50 it returns 250.
NearestFloor(N) Numeric Integer Turns the number into the nearest integer number that is evenly divisible by N and smaller than the number.  For example if the value is 155 and N=50 it returns 150.  If the value is 199 and N=50 it returns 150.
Nth(N,delimiter) String String Splits the current String value into an array of Strings using the specified delimiter and then returns the 1-based Nth element of that array.  For example "Nth(1,',')" against "one,two,three" returns "one".
NumericOnly String String Strips away any character that is not between 0-9, a period, a comma, or a minus sign; e.g. '$12.25' becomes '12.25'.
Prepend(string) String String Prepends the specified string value.  See also Append(string).
Remainder(N) Numeric Numeric Returns the remainder after dividing the current Decimal or Integer value by N.  See also Add, Subtract, Multiply, and Divide.
RemainderMonths
RemainderMonths(N)
RemainderMonths(N,method)
DateTime Integer Returns the remainder months after the difference in full years between the given DateTime and Now in the US Eastern Standard Time time zone.   To consider the starting DateTime value as UTC time use the timezone modifier first; any time zone will work.  For any other time zones please contact us as we know that we must expand the functionality of this function to support other time zones, however, at the granularity of a month it probably does not matter.

The result is a positive number (or zero) for a DateTime that is prior to Now.  The result is a negative number (or zero) for a DateTime that is after Now.

Optional argument N rounds the remainder to its nearest multiple of N.  For example if the remainder is 4 and N=3 it returns 3.  If the remainder is 5 and N=3 it returns 6.

Optional argument method defines the rounding method to be used.  Methods are floor, ceiling, or round.  Modifier remaindermonths(N) is equivalent to remaindermonths(N,round).  Token Substitution expressions are not permitted for the method argument.

For example if the method is floor and the remainder is 4 while N=3 it returns 3; if the remainder is 5 while N=3 it also returns 3.

If the method is ceiling and the remainder is 4 while N=3 it returns 6; if the remainder is 5 while N=3 it also returns 6.
RemoveLeading(MatchString)
String String Removes substring at beginning of string if and only if it matches MatchString.
RemoveWhiteSpace String String Removes all characters with ASCII decimal codes 32 or less.  This includes for example all spaces, tabs, CRs (carriage returns), and LFs (line feeds).
Right(N) String String Returns the rightmost N characters.
Replace(FindString,ReplaceString) String String Replaces all occurrences of FindString with ReplaceStringFindString is not allowed to be the empty string; if you wish to map the empty string to some value then either use the modifier Default or use the modifier MapString.
RTrim String String Trims trailing spaces.
SHA1 String String Returns the US Secure Hash Algorithm 1 hashed encoding of the value.
StringToDecimal String Decimal Converts a string representation of a Decimal number in "en-US" format -- where commas are optional and represent thousands and a period represents a decimal point -- into a Decimal number with that value.
StringToInteger String Integer Converts a string that consists of only digits into an Integer with that value.
Subtract(N) Numeric Numeric Subtracts N from the current Decimal or Integer value.  See also Add, Multiply, Divide, and Remainder.
TimeZone(tzStringName) UTC DateTime Local DateTime Modifier TimeZone(tzStringName) considers the DateTime value to be in Universal Coordinated Time format (UTC) and converts it to the specified time zone.  Example: TimeZone('US Eastern Standard Time').

Supported tzStringName values are as follows.

Afghanistan Standard Time
Alaskan Standard Time
Arab Standard Time
Arabian Standard Time
Arabic Standard Time
Argentina Standard Time
Atlantic Standard Time
AUS Central Standard Time
AUS Eastern Standard Time
Azerbaijan Standard Time
Azores Standard Time
Bahia Standard Time
Bangladesh Standard Time
Canada Central Standard Time
Cape Verde Standard Time
Caucasus Standard Time
Cen. Australia Standard Time
Central America Standard Time
Central Asia Standard Time
Central Brazilian Standard Time
Central Europe Standard Time
Central European Standard Time
Central Pacific Standard Time
Central Standard Time
Central Standard Time (Mexico)
China Standard Time
Dateline Standard Time
E. Africa Standard Time
E. Australia Standard Time
E. Europe Standard Time
E. South America Standard Time
Eastern Standard Time
Egypt Standard Time
Ekaterinburg Standard Time
Fiji Standard Time
FLE Standard Time
Georgian Standard Time
GMT Standard Time
Greenland Standard Time
Greenwich Standard Time
GTB Standard Time
Hawaiian Standard Time
India Standard Time
Iran Standard Time
Israel Standard Time
Jordan Standard Time
Kaliningrad Standard Time
Kamchatka Standard Time
Korea Standard Time
Magadan Standard Time
Mauritius Standard Time
Mid-Atlantic Standard Time
Middle East Standard Time
Montevideo Standard Time
Morocco Standard Time
Mountain Standard Time
Mountain Standard Time (Mexico)
Myanmar Standard Time
N. Central Asia Standard Time
Namibia Standard Time
Nepal Standard Time
New Zealand Standard Time
Newfoundland Standard Time
North Asia East Standard Time
North Asia Standard Time
Pacific SA Standard Time
Pacific Standard Time
Pacific Standard Time (Mexico)
Pakistan Standard Time
Paraguay Standard Time
Romance Standard Time
Russian Standard Time
SA Eastern Standard Time
SA Pacific Standard Time
SA Western Standard Time
Samoa Standard Time
SE Asia Standard Time
Singapore Standard Time
South Africa Standard Time
Sri Lanka Standard Time
Syria Standard Time
Taipei Standard Time
Tasmania Standard Time
Tokyo Standard Time
Tonga Standard Time
Turkey Standard Time
Ulaanbaatar Standard Time
US Eastern Standard Time
US Mountain Standard Time
UTC
Venezuela Standard Time
Vladivostok Standard Time
W. Australia Standard Time
W. Central Africa Standard Time
W. Europe Standard Time
West Asia Standard Time
West Pacific Standard Time
Yakutsk Standard Time
TitleCase String String Converts the first character of a word to uppercase and the rest of the characters to lowercase. However, this method does not currently provide proper casing to convert a word that is entirely uppercase, such as an acronym or proper names. For example, "john mcmaster" would be changed to "John Mcmaster" not the correct "John McMaster"
TotalMonths
TotalMonths(N)
TotalMonths(N,method)
DateTime Integer Returns the difference in months between the given DateTime and Now in the US Eastern Standard Time time zone.   To consider the starting DateTime value as UTC time use the TimeZone modifier first; any time zone will work.  For any other time zones please contact us as we know that we must expand the functionality of this function to support other time zones, however, at the granularity of a month it probably does not matter.

The result is a positive number (or zero) for a DateTime that is prior to Now.  The result is a negative number (or zero) for a DateTime that is after Now.

Optional argument N rounds the number to its nearest multiple of N.  For example if the difference is 7 and N=6 it returns 6.  If the difference is 11 and N=6 it returns 12.

Optional argument method defines the rounding method to be used.  Methods are floor, ceiling, or round.  Modifier totalmonths(N) is equivalent to totalmonths(N,round).  Token Substitution expressions are not permitted for the method argument.

For example if the method is floor and the difference is 7 while N=6 it returns 6; if the difference is 11 while N=6 it also returns 6.

If the method is ceiling and the difference is 7 while N=6 it returns 12; if the difference is 11 while N=6 it also returns 12.
Trim String String Trims leading and trailing spaces.
UkBankHoliday DateTime Checkbox Returns True if the date is a UK/Wales banking holiday. The UK bank holidays are documented here.
Upper
UCase
String String Converts the string to UPPERCASE.
UrlEncode
UrlEncode(N)
N/A N/A URL encodes the final string value N times.  This modifier is always performed last regardless of the position where it is specified in the modifier chain.  Exception: If XmlEncode is also specified (not recommended) then URL encoding occurs after XML encoding although this it not typical to use both of these encodings at the same time.  Specifying "UrlEncode" is the same as "UrlEncode(1)".    Token Substitution expressions are not permitted for N.
UsaBankHoliday DateTime Checkbox Returns True if the date is a USA Federal Reserve banking holiday. The USA Federal Reserve bank holidays are documented here.
UsPhoneToState String or Integer String Given a valid 10 digit US phone number, this returns the 2 character state abbreviation. If the phone number is not valid or is not location based (such as 800 numbers), the empty string is returned.
UsZipCheck String or Integer Checkbox This does a check to validate 5 digit US postal codes.
UsZipDistance(Zip2) String or Integer Decimal This calculates the distance in statute miles between two zip codes. You can use this in filters to restrict based on service radius. For example, you could use a LH/RH expression with LH = ${f.'Home Address Zip Code' UsZipDistance('30338')} RH = 25 and comparison set to "Less Than or Equal" to limit leads to a 25 mile radius of zip code 30338. Note that you also need to validate the zip code because invalid zip codes will return a distance of -1 so they would also meet the filter.
UsZipToState String or Integer String Given a valid 5 digit US postal code, this returns the 2 character state abbreviation. If an invalid postal code is provided, the empty string is returned.
XmlEncode
XmlEncode(N)
N/A N/A XML encodes the final string value N times.  This modifier is always performed last regardless of the position where it is specified in the modifier chain.  Specifying "XmlEncode" is the same as "XmlEncode(1)".    Token Substitution expressions are not permitted for N.