com.ibm.xsp.script
Class NotesFunctionsDoc

java.lang.Object
  extended by com.ibm.xsp.script.NotesFunctionsDoc

public abstract class NotesFunctionsDoc
extends java.lang.Object

Lotus Notes @Functions emulation layer.


Constructor Summary
NotesFunctionsDoc()
           
 
Method Summary
abstract  double Abs(double value)
          Returns the absolute (unsigned) value of a number.
abstract  java.lang.String Abstract(java.lang.String keywords, int size, java.lang.String beginText, java.lang.String bodyFields)
          Abbreviates the contents of the content of the given field (or list of fields).
abstract  java.util.Date Adjust(java.util.Date date, int years, int months, int days, int hours, int minutes, int seconds)
          Adjusts the specified time-date value by the number of years, months, days, hours, minutes, and/or seconds you specify.
abstract  java.util.Date Adjust(java.util.Date date, int years, int months, int days, int hours, int minutes, int seconds, java.lang.String keywords)
          The lats parameter must contain "[INLOCALTIME]" to further adjust the time for daylight-saving time if the adjustment crosses the boundary and daylight-saving time is in effect.
abstract  com.ibm.jscript.types.FBSValue AttachmentLengths()
          Returns a list containing the lengths of each of the files attached to the current document If the current document only has one attachment, it returns the length of this attachment
abstract  com.ibm.jscript.types.FBSValue AttachmentModifiedTimes()
          Returns a list containing the last modified date of each of the files attached to the current document If the current document only has one attachment, it returns the date when this attachment was last modified
abstract  com.ibm.jscript.types.FBSValue AttachmentNames()
          Returns a list containing the names of each of the files attached to the current document If the current document only has one attachment, it returns a string containing the name of this attachment
abstract  int Attachments()
          Returns the number of attachments of the current document
abstract  com.ibm.jscript.types.FBSValue Author()
          Returns a text list containing the names of the author(s) of the current document
abstract  int Begins(java.lang.String value, java.lang.String subString)
          Returns 1 if 'value' strats with the substring 'substring', else returns 0.
abstract  java.lang.String Char(int code)
          Returns a character from its unicode number value.
abstract  java.lang.String ClientType()
          Returns "Web"
abstract  void ComputeFields()
          Recompute all fields in the current document
abstract  int Contains(java.lang.String value, java.lang.String subString)
          Determines whether a substring is stored within a string, or if a string list contains an item that contains the given substring.
abstract  int Count(com.ibm.jscript.types.FBSValue list)
          Returns the number of entries in the list.
abstract  java.util.Date Created()
          Returns the time-date when the document was created.
abstract  java.util.Date Date(java.util.Date date)
          Construct a Date object by using the given date: The date part is kept unchanged, while the time portion of the value is replaced by 00:00.
abstract  java.util.Date Date(int years, int months, int days)
          Construct a Date object with the given date, and 00:00 as time.
abstract  java.util.Date Date(int years, int months, int days, int hours, int minutes, int seconds)
          Construct a Date object with all given parameters.
abstract  int Day(java.util.Date date)
          Extracts and returns the month from the specified date.
abstract  com.ibm.jscript.types.FBSValue DbColumn(java.lang.String dbName, java.lang.String viewName, int colNumber)
          Returns the values found in the given view column.
abstract  com.ibm.jscript.types.FBSValue DbLookup(java.lang.String dbName, java.lang.String viewName, java.lang.String key, int colNumber)
          Returns the values found in the given view column, where the sorted columns of the view match the given key.
abstract  com.ibm.jscript.types.FBSValue DbLookup(java.lang.String dbName, java.lang.String viewName, java.lang.String key, java.lang.String fieldName)
          Given a key value, looks in the specified view and finds all documents containing the key value in the first sorted column within the view.
abstract  java.lang.String DbName()
          Returns the name of the current database.
abstract  java.lang.String DbTitle()
          Returns the label of the current database.
abstract  com.ibm.jscript.types.FBSValue Do(com.ibm.jscript.types.FBSValue values)
          All the args are evaluated, return the last value
abstract  java.lang.String DocID()
          Returns the ID of the current XML document (in XSP database)
abstract  com.ibm.jscript.types.FBSValue Element(com.ibm.jscript.types.FBSValue list, int position)
          Return the element of the list at the given position.
abstract  int Elements(com.ibm.jscript.types.FBSValue list)
          Returns the number of entries in the list, except null, undefined or empty string values.
abstract  int Ends(java.lang.String value, java.lang.String subString)
          Returns 1 if 'value' ends with the substring 'substring', else returns 0.
abstract  com.ibm.jscript.types.FBSValue Error()
          Allows you to generate an error condition within an expression.
abstract  com.ibm.jscript.types.FBSValue Explode(java.lang.String value)
          Returns a string list composed by elements of the given string, each element in the given string are separated by space, comma or semicolon.
abstract  com.ibm.jscript.types.FBSValue Explode(java.lang.String value, java.lang.String separators)
          Returns a string list composed by elements of the given string, each element in the given string are separated by one the given separators
abstract  com.ibm.jscript.types.FBSValue Explode(java.lang.String value, java.lang.String separators, int incEmpties)
          Returns a string list composed by elements of the given string, each element in the given string are separated by one the given separators If incEmpties is 1, an empty string ("") is placed in the returned list when a separator appears at the beginning or end of the string, or two separators appear consecutively in the string.
abstract  com.ibm.jscript.types.FBSValue Explode(java.lang.String value, java.lang.String separators, int incEmpties, int newLineAsSeparator)
          Returns a string list composed by elements of the given string, each element in the given string are separated by one the given separators If incEmpties is 1, an empty string ("") is placed in the returned list when a separator appears at the beginning or end of the string, or two separators appear consecutively in the string.
abstract  int Failure(java.lang.String message)
          Returns a message that you supply.
abstract  int False()
          Returns the number 0.
abstract  java.util.Date GetDateField(java.lang.String name)
          Returns the value of the given date field
abstract  java.lang.String GetEditorField(java.lang.String name)
          Returns the value of the given editor field
abstract  com.ibm.jscript.types.FBSValue GetField(java.lang.String name)
          Returns the value of the given field
abstract  double GetNumberField(java.lang.String name)
          Returns the value of the given number field
abstract  java.lang.String GetReaderField(java.lang.String name)
          Returns the value of the given reader field
abstract  java.lang.String GetTextField(java.lang.String name)
          Returns the value of the given text field
abstract  int Hour(java.util.Date date)
          Extracts and returns the number of the hour in the specified date.
abstract  void If()
          Evaluates a condition
abstract  java.lang.String Implode(com.ibm.jscript.types.FBSValue textList)
          Concatenates all members of the given text list separated by a space and returns a text string.
abstract  java.lang.String Implode(com.ibm.jscript.types.FBSValue textList, java.lang.String sep)
          Concatenates all members of the given text list separated by the given separator
abstract  double Integer(double value)
          Truncates the values in a number or number list at the whole number, leaving off any decimals.
abstract  int IsAvailable(java.lang.String name)
          Returns 1 if the given field exists in the current document.
abstract  int IsDocBeingLoaded()
          Returns 1 if the current document is being loaded.
abstract  int IsDocBeingSaved()
          Returns 1 if the current document is being saved.
abstract  int IsError(com.ibm.jscript.types.FBSValue value)
          Returns 1 if the value is an undefined value or a list of undefined values, or if it is a number that corresponds to "Not a Number" value.
abstract  com.ibm.jscript.types.FBSValue IsMember(com.ibm.jscript.types.FBSValue value, com.ibm.jscript.types.FBSValue list)
          Returns 1 if all elements of the first list (value) are contained in the second list.
abstract  int IsMember(java.lang.String value, com.ibm.jscript.types.FBSValue list)
          Returns 1 if the given list contains the given string.
abstract  int IsNewDoc()
          Returns 1 if the current document is a new document.
abstract  com.ibm.jscript.types.FBSValue IsNotMember(com.ibm.jscript.types.FBSValue value, com.ibm.jscript.types.FBSValue list)
          Indicates if a text string (or a text list) is not contained within another text list.
abstract  int IsNotMember(java.lang.String value, com.ibm.jscript.types.FBSValue list)
           
abstract  int IsNull(com.ibm.jscript.types.FBSValue value)
          Returns 1 if the value is an empty string (or a list of empty strings), and returns 0 if the value is not a string value, is not empty, or is an error.
abstract  int IsNumber(com.ibm.jscript.types.FBSValue value)
          Returns 1 if the value is a number or a number list.
abstract  int IsResponseDoc()
          Returns 1 if the current document is a response document.
abstract  int IsText(com.ibm.jscript.types.FBSValue value)
          Returns 1 if the value is a string or a string list
abstract  int IsTime(com.ibm.jscript.types.FBSValue value)
          Returns 1 if the value is a date or a date list
abstract  int IsUnavailable(java.lang.String name)
          Returns 0 if the given field exists in the current document.
abstract  int IsWebClient()
          Returns true.
abstract  java.lang.String Left(java.lang.String value, int n)
          Returns the leftmost characters of the string.
abstract  java.lang.String Left(java.lang.String value, java.lang.String subString)
          Searches a string from left to right and returns the leftmost characters of the string.
abstract  java.lang.String LeftBack(java.lang.String value, int n)
          Returns the leftmost characters of the given string, except the n lats characters.
abstract  java.lang.String LeftBack(java.lang.String value, java.lang.String subString)
          Searches a string from right to left and returns a substring.
abstract  int Length(java.lang.String value)
          Returns the number of characters in the specified string, or if the argument is a string list,
abstract  com.ibm.jscript.types.FBSValue List(com.ibm.jscript.types.FBSVariableArgs values)
          Create a new value form the given values : if tehre several values, an array will be created.
abstract  java.lang.String LowerCase(java.lang.String value)
          Converts the uppercase letters in the specified string to lowercase.
abstract  double Max(com.ibm.jscript.types.FBSVariableArgs values)
          Returns the greatest number among the given arguments.
abstract  int Member(java.lang.String value, com.ibm.jscript.types.FBSValue list)
          Returns the position of the given value in the given string list.
abstract  java.lang.String Middle(java.lang.String value, int offset, int len)
          Returns the substring from the middle of the given 'value' string, which begins at the given offset, and ends after 'len' number of characters have been reached.
abstract  java.lang.String Middle(java.lang.String value, int offset, java.lang.String endString)
          The substring from the middle of string, which begins at the 'offset' and ends at the 'endstring'.
abstract  java.lang.String Middle(java.lang.String value, java.lang.String startString, int len)
          The substring from the middle of string, which begins at the 'startString' you specify and ends after 'len' number of characters have been reached.
abstract  java.lang.String Middle(java.lang.String value, java.lang.String startString, java.lang.String endString)
          The substring from the middle of string, which begins at the 'startString' you specify and ends at the 'endstring'.
abstract  java.lang.String MiddleBack(java.lang.String value, int offset, int len)
          Returns a substring from the middle of the given string.
abstract  java.lang.String MiddleBack(java.lang.String value, int offset, java.lang.String endString)
          Returns a substring from the middle of the given string.
abstract  java.lang.String MiddleBack(java.lang.String value, java.lang.String startString, int len)
          Returns a substring from the middle of the given string.
abstract  java.lang.String MiddleBack(java.lang.String value, java.lang.String startString, java.lang.String endString)
          Returns a substring from the middle of the given string.
abstract  double Min(com.ibm.jscript.types.FBSVariableArgs values)
          Returns the smallest number among the given arguments.
abstract  int Minute(java.util.Date date)
          Extracts and returns the number of minutes from the specified date.
abstract  java.util.Date Modified()
          Returns a time-date value indicating when the document was last modified.
abstract  double Modulo(double value, double divider)
          Returns the remainder of a division operation.
abstract  int Month(java.util.Date date)
          Extracts and returns the month from the specified date.
abstract  java.lang.String Name(java.lang.String action, java.lang.String name)
          Allows you to manipulate LDAP formatted names.
abstract  java.lang.String NewLine()
          Returns '\n' character
abstract  int No()
          Returns the number 0.
abstract  int Now()
          Returns the current Date in the server time zone.
abstract  int Now(java.lang.String options, java.lang.String serverNames)
          Returns the current Date in the server time zone.
abstract  com.ibm.jscript.types.FBSValue Null()
          Allows you to return the null value.
abstract  java.lang.String ProperCase(java.lang.String value)
          Converts the words in a string to proper-name capitalization: the first letter of each word becomes uppercase, all others become lowercase.
abstract  double Random()
          Returns a double value with a positive sign, greater than or equal to 0.0 and less than 1.0.
abstract  java.lang.String Repeat(java.lang.String value, int repeat)
          Repeats a string a specified number of times.
abstract  java.lang.String Repeat(java.lang.String value, int repeat, int maxChar)
          Repeats a string a specified number of times, but stop when the resulting string contains 'maxchar' characters.
abstract  com.ibm.jscript.types.FBSValue Replace(com.ibm.jscript.types.FBSValue sourceList, com.ibm.jscript.types.FBSValue fromList, com.ibm.jscript.types.FBSValue toList)
          Performs a find-and-replace operation on a text list.
abstract  com.ibm.jscript.types.FBSValue ReplaceSubstring(com.ibm.jscript.types.FBSValue sourceList, com.ibm.jscript.types.FBSValue fromList)
          Replaces specific words or phrases in a string with new words or phrases that you specify.
abstract  void Return(com.ibm.jscript.types.FBSValue value)
          Is equivalent to return statement.
abstract  java.lang.String Right(java.lang.String value, int n)
          Returns the rightmost characters in the string.
abstract  java.lang.String Right(java.lang.String value, java.lang.String subString)
          Returns returns all of the characters to the right of subString in the given string.
abstract  java.lang.String RightBack(java.lang.String value, int n)
          Returns the rightmost characters in a string.
abstract  java.lang.String RightBack(java.lang.String value, java.lang.String rightBack)
           
abstract  double Round(double value)
          Rounds the specified number to the nearest whole number.
abstract  double Round(double value, double factor)
          Rounds the specified number to the nearest whole number.
abstract  java.lang.String Schema()
          Returns the schema of the current XML document
abstract  int Second(java.util.Date date)
          Extracts and returns the number of seconds from the specified date.
abstract  java.lang.String Select(int position, com.ibm.jscript.types.FBSVariableArgs list)
          Returns the value that appears in the number 'position' in the given list.
abstract  void SetDateField(java.lang.String name, java.util.Date value)
          Set the given value to the given date field
abstract  void SetEditorField(java.lang.String name, java.lang.String value)
          Set the given value to the given editor field
abstract  void SetField(java.lang.String name, com.ibm.jscript.types.FBSValue value)
          Set the given value to the given field
abstract  void SetNumberField(java.lang.String name, double value)
          Set the given value to the given number field
abstract  void SetReaderField(java.lang.String name, java.lang.String value)
          Set the given value to the reader field
abstract  void SetTextField(java.lang.String name, java.lang.String value)
          Set the given value to the given text field
abstract  com.ibm.jscript.types.FBSValue Subset(com.ibm.jscript.types.FBSValue list, int length)
          Extract from the given list from left to right the given number of values (length).
abstract  int Success()
          Returns 1 (True).
abstract  double Sum(double value)
          Adds a set of numbers or number lists.
abstract  java.lang.String Text(com.ibm.jscript.types.FBSValue value)
          Converts any value to a string.
abstract  java.lang.String Text(com.ibm.jscript.types.FBSValue value, java.lang.String format)
          Converts any value to a string.
abstract  double TextToNumber(java.lang.String value)
          Converts a string to a number value, where possible, else returns 0.
abstract  java.util.Date TextToTime(java.lang.String value)
          Converts a string to a Date value, where possible, else returns an empty string.
abstract  java.util.Date Time(java.util.Date date)
          Construct a Date object by using the given date: The time part is kept unchanged, while the date portion of the value is replaced by the 1st january 1970.
abstract  java.util.Date Time(int hours, int minutes, int seconds)
          Construct a Date object with the given time, and 1st january 1970 as date.
abstract  java.util.Date Time(int years, int months, int days, int hours, int minutes, int seconds)
          Construct a Date object with all given parameters.
abstract  java.util.Date Today()
          Returns today's date with 00:00 as time.
abstract  java.util.Date Tomorrow()
          Returns the date value that corresponds to tomorrow's date, with 00:00 as time.
abstract  java.lang.String Trim(java.lang.String value)
          Removes leading, trailing, and redundant spaces from the given string, or from each element of the given string list.
abstract  int True()
          Returns the number 1.
abstract  java.lang.String Unique()
          Returns a random, unique text value.
abstract  com.ibm.jscript.types.FBSValue Unique(com.ibm.jscript.types.FBSValue list)
          Removes duplicate values from the given list.
abstract  java.lang.String UpperCase(java.lang.String value)
          Converts the lowercase letters in the specified string to uppercase.
abstract  java.lang.String UserName()
          Returns the distinguish name of the current user
abstract  java.lang.String UserName(int index)
          Returns the distinguish name of the current user, whatever the index is.
abstract  int WeekDay(java.util.Date date)
          Computes the day of the week and returns a number that identifies the day.
abstract  java.lang.String Word(java.lang.String value, java.lang.String separator, int n)
          Returns the 'n'th word from the given string.
abstract  int Year(java.util.Date date)
          Extracts and returns the year from the specified date.
abstract  int Yes()
          Returns the value 1.
abstract  java.util.Date Yesterday()
          Returns the date value that corresponds to yesterday's date, with 00:00 as time.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NotesFunctionsDoc

public NotesFunctionsDoc()
Method Detail

True

public abstract int True()
Returns the number 1. This function is equivalent to @Yes.

Returns:
1

False

public abstract int False()
Returns the number 0. This function is equivalent to @No.

Returns:
0

Yes

public abstract int Yes()
Returns the value 1. This function is equivalent to @True.

Returns:
1

No

public abstract int No()
Returns the number 0. This function is equivalent to @False.

Returns:
0

Success

public abstract int Success()
Returns 1 (True). Use this function with @If in field validation formulas to indicate that the value entered satisfies the validation criteria

Returns:
1

Failure

public abstract int Failure(java.lang.String message)
Returns a message that you supply. When used in an input validation formula, @Failure returns the message and the validation fails. Note that it slightly differs from Lotus Notes as the message is not automatically displayed.

Parameters:
message - the error message
Returns:
the message

Error

public abstract com.ibm.jscript.types.FBSValue Error()
Allows you to generate an error condition within an expression. In Javascript, such an error is returned as the undefined value. As a consequence, @IsError() is simply checking for undefined.

Returns:
undefined

Null

public abstract com.ibm.jscript.types.FBSValue Null()
Allows you to return the null value. It is a common practice in Notes to use an undefined NULL field to get the null value. FlowBuilder transform this to an @Null call, which as been defined for this purpose.

Returns:
null

Year

public abstract int Year(java.util.Date date)
Extracts and returns the year from the specified date. Note that unlike Notes, in JavaScript, it is not possible to have a Date object that contains only time (no date). For that reason, we may notice a different result in some cases : when the parameter in Notes contains only time, this function returns -1, but in JavaScript, the date object will have 01/01/1970 as date, so that this function will return 1970.


Month

public abstract int Month(java.util.Date date)
Extracts and returns the month from the specified date. Note that unlike Notes, in JavaScript, it is not possible to have a Date object that contains only time (no date). For that reason, we may notice a different result in some cases : when the parameter in Notes contains only time, this function returns -1, but in JavaScript, the date object will have 01/01/1970 as date, so that this function will return 1.


Day

public abstract int Day(java.util.Date date)
Extracts and returns the month from the specified date. Note that unlike Notes, in JavaScript, it is not possible to have a Date object that contains only time (no date). For that reason, we may notice a different result in some cases : when the parameter in Notes contains only time, this function returns -1, but in JavaScript, the date object will have 01/01/1970 as date, so that this function will return 1.


Hour

public abstract int Hour(java.util.Date date)
Extracts and returns the number of the hour in the specified date. Hours are represented as 0 through 23 for 12 AM through 11 PM. Note that unlike Notes, in JavaScript, it is not possible to have a Date object that contains only date (no time). For that reason, we may notice a different result in some cases : when the parameter in Notes contains only date, this function returns -1, but in JavaScript, the date object will have 00:00 as time, so that this function will return 0.


Minute

public abstract int Minute(java.util.Date date)
Extracts and returns the number of minutes from the specified date. Note that unlike Notes, in JavaScript, it is not possible to have a Date object that contains only date (no time). For that reason, we may notice a different result in some cases : when the parameter in Notes contains only date, this function returns -1, but in JavaScript, the date object will have 00:00 as time, so that this function will return 0.


Second

public abstract int Second(java.util.Date date)
Extracts and returns the number of seconds from the specified date. Note that unlike Notes, in JavaScript, it is not possible to have a Date object that contains only date (no time). For that reason, we may notice a different result in some cases : when the parameter in Notes contains only date, this function returns -1, but in JavaScript, the date object will have 00:00:00 as time, so that this function will return 0.


Now

public abstract int Now()
Returns the current Date in the server time zone.


Now

public abstract int Now(java.lang.String options,
                        java.lang.String serverNames)
Returns the current Date in the server time zone. The 2 parameters "options" (SERVERTIME and LOCALTIMEONERROR options), and "serverNames" are not supported. If this function has parameters, they are ignored during execution.


WeekDay

public abstract int WeekDay(java.util.Date date)
Computes the day of the week and returns a number that identifies the day. Weekday numbers are 1 through 7, with Sunday = 1, Monday = 2, and so on.


Date

public abstract java.util.Date Date(java.util.Date date)
Construct a Date object by using the given date: The date part is kept unchanged, while the time portion of the value is replaced by 00:00.


Date

public abstract java.util.Date Date(int years,
                                    int months,
                                    int days)
Construct a Date object with the given date, and 00:00 as time.


Date

public abstract java.util.Date Date(int years,
                                    int months,
                                    int days,
                                    int hours,
                                    int minutes,
                                    int seconds)
Construct a Date object with all given parameters.


Time

public abstract java.util.Date Time(java.util.Date date)
Construct a Date object by using the given date: The time part is kept unchanged, while the date portion of the value is replaced by the 1st january 1970.


Time

public abstract java.util.Date Time(int hours,
                                    int minutes,
                                    int seconds)
Construct a Date object with the given time, and 1st january 1970 as date.


Time

public abstract java.util.Date Time(int years,
                                    int months,
                                    int days,
                                    int hours,
                                    int minutes,
                                    int seconds)
Construct a Date object with all given parameters.


Today

public abstract java.util.Date Today()
Returns today's date with 00:00 as time.


Tomorrow

public abstract java.util.Date Tomorrow()
Returns the date value that corresponds to tomorrow's date, with 00:00 as time.


Yesterday

public abstract java.util.Date Yesterday()
Returns the date value that corresponds to yesterday's date, with 00:00 as time.


Adjust

public abstract java.util.Date Adjust(java.util.Date date,
                                      int years,
                                      int months,
                                      int days,
                                      int hours,
                                      int minutes,
                                      int seconds)
Adjusts the specified time-date value by the number of years, months, days, hours, minutes, and/or seconds you specify. The amount of adjustment may be positive or negative. Including a zero (0) for parameters means that they won't be adjusted. Overflow occurs when a field value exceeds its range and, as a result, the next larger field is incremented or decremented and the field value is adjusted back into its range. This method will not adjust the time for daylight-saving time if the adjustment crosses the boundary and daylight-saving time is in effect.


Adjust

public abstract java.util.Date Adjust(java.util.Date date,
                                      int years,
                                      int months,
                                      int days,
                                      int hours,
                                      int minutes,
                                      int seconds,
                                      java.lang.String keywords)
The lats parameter must contain "[INLOCALTIME]" to further adjust the time for daylight-saving time if the adjustment crosses the boundary and daylight-saving time is in effect. Any other values will cause no to adjust to DST.

See Also:
Adjust(Date, int, int, int, int, int, int)

IsNull

public abstract int IsNull(com.ibm.jscript.types.FBSValue value)
Returns 1 if the value is an empty string (or a list of empty strings), and returns 0 if the value is not a string value, is not empty, or is an error.


IsNumber

public abstract int IsNumber(com.ibm.jscript.types.FBSValue value)
Returns 1 if the value is a number or a number list.


IsText

public abstract int IsText(com.ibm.jscript.types.FBSValue value)
Returns 1 if the value is a string or a string list


IsTime

public abstract int IsTime(com.ibm.jscript.types.FBSValue value)
Returns 1 if the value is a date or a date list


IsError

public abstract int IsError(com.ibm.jscript.types.FBSValue value)
Returns 1 if the value is an undefined value or a list of undefined values, or if it is a number that corresponds to "Not a Number" value.


Text

public abstract java.lang.String Text(com.ibm.jscript.types.FBSValue value)
Converts any value to a string.


Text

public abstract java.lang.String Text(com.ibm.jscript.types.FBSValue value,
                                      java.lang.String format)
Converts any value to a string. In Notes, the 'format' parameter is used to specify some default options to format date and numbers. This parameter is not supported.


TextToTime

public abstract java.util.Date TextToTime(java.lang.String value)
Converts a string to a Date value, where possible, else returns an empty string.


TextToNumber

public abstract double TextToNumber(java.lang.String value)
Converts a string to a number value, where possible, else returns 0.


Trim

public abstract java.lang.String Trim(java.lang.String value)
Removes leading, trailing, and redundant spaces from the given string, or from each element of the given string list. If a text string is all spaces, @Trim returns an empty string (length of 0). If an element of a text list is all spaces, @Trim removes the element. If all elements of a text list are all spaces, @Trim returns an empty string.


Left

public abstract java.lang.String Left(java.lang.String value,
                                      int n)
Returns the leftmost characters of the string. n is the number of characters to return. If the number is 2, the first two characters of the string are returned; if the number is 5, the first five characters are returned, and so on. If the number is negative, the entire string is returned. If the number is 0, an empty string is returned.


Left

public abstract java.lang.String Left(java.lang.String value,
                                      java.lang.String subString)
Searches a string from left to right and returns the leftmost characters of the string.


LeftBack

public abstract java.lang.String LeftBack(java.lang.String value,
                                          int n)
Returns the leftmost characters of the given string, except the n lats characters. Counting from right to left, n is the number of characters to skip. All the characters to the left of that number of characters are returned. If the number is negative, the entire string is returned.


LeftBack

public abstract java.lang.String LeftBack(java.lang.String value,
                                          java.lang.String subString)
Searches a string from right to left and returns a substring. All the characters to the left of startString are returned.


Right

public abstract java.lang.String Right(java.lang.String value,
                                       int n)
Returns the rightmost characters in the string. n is the number of characters to return. If the number is 2, the last two characters of given string are returned.


Right

public abstract java.lang.String Right(java.lang.String value,
                                       java.lang.String subString)
Returns returns all of the characters to the right of subString in the given string. It finds subString by searching teh given string from left to right.


RightBack

public abstract java.lang.String RightBack(java.lang.String value,
                                           int n)
Returns the rightmost characters in a string. Counting from left to right, n is the number of characters to skip. All the characters to the right of that number are returned.


RightBack

public abstract java.lang.String RightBack(java.lang.String value,
                                           java.lang.String rightBack)

Middle

public abstract java.lang.String Middle(java.lang.String value,
                                        int offset,
                                        int len)
Returns the substring from the middle of the given 'value' string, which begins at the given offset, and ends after 'len' number of characters have been reached.


Middle

public abstract java.lang.String Middle(java.lang.String value,
                                        int offset,
                                        java.lang.String endString)
The substring from the middle of string, which begins at the 'offset' and ends at the 'endstring'.


Middle

public abstract java.lang.String Middle(java.lang.String value,
                                        java.lang.String startString,
                                        int len)
The substring from the middle of string, which begins at the 'startString' you specify and ends after 'len' number of characters have been reached.


Middle

public abstract java.lang.String Middle(java.lang.String value,
                                        java.lang.String startString,
                                        java.lang.String endString)
The substring from the middle of string, which begins at the 'startString' you specify and ends at the 'endstring'.


MiddleBack

public abstract java.lang.String MiddleBack(java.lang.String value,
                                            int offset,
                                            int len)
Returns a substring from the middle of the given string. The middle is found by scanning the string from right to left, and parameters determine where the middle begins and ends. 'offset' determine the beginning, and 'len' the number of characters to be returned.


MiddleBack

public abstract java.lang.String MiddleBack(java.lang.String value,
                                            int offset,
                                            java.lang.String endString)
Returns a substring from the middle of the given string. The middle is found by scanning the string from right to left, and parameters determine where the middle begins and ends. 'offset' determine where the substring starts, and 'endstring' where it ends.


MiddleBack

public abstract java.lang.String MiddleBack(java.lang.String value,
                                            java.lang.String startString,
                                            int len)
Returns a substring from the middle of the given string. The middle is found by scanning the string from right to left, and parameters determine where the middle begins and ends. 'startString' determine where the substring starts, and 'len' the number of characters to be returned.


MiddleBack

public abstract java.lang.String MiddleBack(java.lang.String value,
                                            java.lang.String startString,
                                            java.lang.String endString)
Returns a substring from the middle of the given string. The middle is found by scanning the string from right to left, and parameters determine where the middle begins and ends. 'startString' determine where the substring starts, and 'endstring' where it ends.


Contains

public abstract int Contains(java.lang.String value,
                             java.lang.String subString)
Determines whether a substring is stored within a string, or if a string list contains an item that contains the given substring. Returns 1 if true, 0 otherwise. This function is case-sensitive.


Begins

public abstract int Begins(java.lang.String value,
                           java.lang.String subString)
Returns 1 if 'value' strats with the substring 'substring', else returns 0.


Ends

public abstract int Ends(java.lang.String value,
                         java.lang.String subString)
Returns 1 if 'value' ends with the substring 'substring', else returns 0.


LowerCase

public abstract java.lang.String LowerCase(java.lang.String value)
Converts the uppercase letters in the specified string to lowercase.


UpperCase

public abstract java.lang.String UpperCase(java.lang.String value)
Converts the lowercase letters in the specified string to uppercase.


ProperCase

public abstract java.lang.String ProperCase(java.lang.String value)
Converts the words in a string to proper-name capitalization: the first letter of each word becomes uppercase, all others become lowercase.


Name

public abstract java.lang.String Name(java.lang.String action,
                                      java.lang.String name)
Allows you to manipulate LDAP formatted names. 'name' is the name in Domino LDAP syntax, or standard LDAP syntax. If your default directory (defined in resources.xml) is a Domino Directory, this method will manipulate the given string to return the correct value. The given string must be in a standard Domino format. (ex : G=John/I=JS/S=Smith/Q=Jr/CN=John Smith/OU=Development/OU=Engineering/O=IBM/C=US) If your default directory (defined in resources.xml) is not a Domino Directory, this method will try to connect to the directory to access user information. The given string must be in a strandard LDAP format. (ex : uid=atinov,ou=People,o=triloggroup.com) If the user cannot be found in your default directory, this method will try to get information from the given string. (ex : If the given string contains CN=Philip Collins, and [CN] option is asked, it will returned "Philip Collins" event if the user is not in your default directory. 'action' must one of the following strings : (note that not all Notes options are available) "[CN]" returns the common name part. (or the given string if not found) "[S]" returns the surname component (the last name) of a user. (or empty if not found) "[Q]" returns the generation component (such as "Jr") of a hierarchical name. This option is only supported with Domino Directory. (or empty if not found) "[G]" returns the given name component (the first name) of a user. (or empty if not found) "[I]" returns the initials component of a hierarchical name. This option is only supported with Domino Directory. (or empty if not found) "[A]" returns the ADMD component (administration management domain name) of a hierarchical name. This option is only supported with Domino Directory. (or empty if not found) "[C]" returns the country/region component of a user. (or empty if not found) "[O]" returns the organization component of the user. (or empty if not found) "[P]" returns the PRMD component (private management domain name) of a hierarchical name. This option is only supported with Domino Directory. (or empty if not found) "[OUn]" where n is from 1 to 4, returns the specified organizational unit component of a hierarchical name; Example : 'OU1' returns the first occurrence of the OU label. "[OU]" is not allowed as a keyword. (or empty if not found) "[ABBREVIATE]" Abbreviates a hierarchical name, removing the component labels. This saves space in the display, and looks friendlier. (if the user is not found, simply return the given string) "[CANONICALIZE]" and other not supported option return the given string. An unknown option will return an empty string.


Length

public abstract int Length(java.lang.String value)
Returns the number of characters in the specified string, or if the argument is a string list,


ReplaceSubstring

public abstract com.ibm.jscript.types.FBSValue ReplaceSubstring(com.ibm.jscript.types.FBSValue sourceList,
                                                                com.ibm.jscript.types.FBSValue fromList)
Replaces specific words or phrases in a string with new words or phrases that you specify. Case sensitive.


UserName

public abstract java.lang.String UserName()
Returns the distinguish name of the current user


UserName

public abstract java.lang.String UserName(int index)
Returns the distinguish name of the current user, whatever the index is. The second argument is only for Notes compliance, but is not supported in XSP.


NewLine

public abstract java.lang.String NewLine()
Returns '\n' character


Word

public abstract java.lang.String Word(java.lang.String value,
                                      java.lang.String separator,
                                      int n)
Returns the 'n'th word from the given string. A "word" is defined as the part of a string that is delimited by the specified separator character.


Char

public abstract java.lang.String Char(int code)
Returns a character from its unicode number value. Note that Notes uses IBM 850 code page.


Select

public abstract java.lang.String Select(int position,
                                        com.ibm.jscript.types.FBSVariableArgs list)
Returns the value that appears in the number 'position' in the given list. If the number is greater than the number of values,


Repeat

public abstract java.lang.String Repeat(java.lang.String value,
                                        int repeat)
Repeats a string a specified number of times.


Repeat

public abstract java.lang.String Repeat(java.lang.String value,
                                        int repeat,
                                        int maxChar)
Repeats a string a specified number of times, but stop when the resulting string contains 'maxchar' characters.


Abstract

public abstract java.lang.String Abstract(java.lang.String keywords,
                                          int size,
                                          java.lang.String beginText,
                                          java.lang.String bodyFields)
Abbreviates the contents of the content of the given field (or list of fields). If a field is not found, the name of the field is taken in account. 'size' indicates the max size for the abstracted text. 'beginText' indicates a text to put at the beginning of the abstract. 'keywords' represents some options to do the abstraction. It may contain the following strings : [TRYFIT], [DROPVOWELS], [ABBREV], [DROPFIRSTVOWEL], [TRIMPUNCT], [RULE1], [RULE2], [RULE3]


Abs

public abstract double Abs(double value)
Returns the absolute (unsigned) value of a number.


Round

public abstract double Round(double value)
Rounds the specified number to the nearest whole number.


Round

public abstract double Round(double value,
                             double factor)
Rounds the specified number to the nearest whole number. The second argument is used as the rounding factor.


Sum

public abstract double Sum(double value)
Adds a set of numbers or number lists.


Integer

public abstract double Integer(double value)
Truncates the values in a number or number list at the whole number, leaving off any decimals.


Random

public abstract double Random()
Returns a double value with a positive sign, greater than or equal to 0.0 and less than 1.0. Returned values are chosen pseudorandomly with (approximately) uniform distribution from that range.


Modulo

public abstract double Modulo(double value,
                              double divider)
Returns the remainder of a division operation. (% operator) Returns 'not a number' if the second argument is 0.


Created

public abstract java.util.Date Created()
Returns the time-date when the document was created.


Modified

public abstract java.util.Date Modified()
Returns a time-date value indicating when the document was last modified. (and saved)


GetField

public abstract com.ibm.jscript.types.FBSValue GetField(java.lang.String name)
Returns the value of the given field


GetTextField

public abstract java.lang.String GetTextField(java.lang.String name)
Returns the value of the given text field


GetNumberField

public abstract double GetNumberField(java.lang.String name)
Returns the value of the given number field


GetDateField

public abstract java.util.Date GetDateField(java.lang.String name)
Returns the value of the given date field


GetReaderField

public abstract java.lang.String GetReaderField(java.lang.String name)
Returns the value of the given reader field


GetEditorField

public abstract java.lang.String GetEditorField(java.lang.String name)
Returns the value of the given editor field


SetField

public abstract void SetField(java.lang.String name,
                              com.ibm.jscript.types.FBSValue value)
Set the given value to the given field


SetTextField

public abstract void SetTextField(java.lang.String name,
                                  java.lang.String value)
Set the given value to the given text field


SetNumberField

public abstract void SetNumberField(java.lang.String name,
                                    double value)
Set the given value to the given number field


SetDateField

public abstract void SetDateField(java.lang.String name,
                                  java.util.Date value)
Set the given value to the given date field


SetReaderField

public abstract void SetReaderField(java.lang.String name,
                                    java.lang.String value)
Set the given value to the reader field


SetEditorField

public abstract void SetEditorField(java.lang.String name,
                                    java.lang.String value)
Set the given value to the given editor field


DocID

public abstract java.lang.String DocID()
Returns the ID of the current XML document (in XSP database)


Schema

public abstract java.lang.String Schema()
Returns the schema of the current XML document


IsAvailable

public abstract int IsAvailable(java.lang.String name)
Returns 1 if the given field exists in the current document.


IsUnavailable

public abstract int IsUnavailable(java.lang.String name)
Returns 0 if the given field exists in the current document.


IsNewDoc

public abstract int IsNewDoc()
Returns 1 if the current document is a new document.


IsResponseDoc

public abstract int IsResponseDoc()
Returns 1 if the current document is a response document.


IsDocBeingSaved

public abstract int IsDocBeingSaved()
Returns 1 if the current document is being saved.


IsDocBeingLoaded

public abstract int IsDocBeingLoaded()
Returns 1 if the current document is being loaded.


Attachments

public abstract int Attachments()
Returns the number of attachments of the current document


AttachmentNames

public abstract com.ibm.jscript.types.FBSValue AttachmentNames()
Returns a list containing the names of each of the files attached to the current document If the current document only has one attachment, it returns a string containing the name of this attachment


AttachmentLengths

public abstract com.ibm.jscript.types.FBSValue AttachmentLengths()
Returns a list containing the lengths of each of the files attached to the current document If the current document only has one attachment, it returns the length of this attachment


AttachmentModifiedTimes

public abstract com.ibm.jscript.types.FBSValue AttachmentModifiedTimes()
Returns a list containing the last modified date of each of the files attached to the current document If the current document only has one attachment, it returns the date when this attachment was last modified


Author

public abstract com.ibm.jscript.types.FBSValue Author()
Returns a text list containing the names of the author(s) of the current document


DbColumn

public abstract com.ibm.jscript.types.FBSValue DbColumn(java.lang.String dbName,
                                                        java.lang.String viewName,
                                                        int colNumber)
Returns the values found in the given view column.


DbLookup

public abstract com.ibm.jscript.types.FBSValue DbLookup(java.lang.String dbName,
                                                        java.lang.String viewName,
                                                        java.lang.String key,
                                                        int colNumber)
Returns the values found in the given view column, where the sorted columns of the view match the given key.


DbLookup

public abstract com.ibm.jscript.types.FBSValue DbLookup(java.lang.String dbName,
                                                        java.lang.String viewName,
                                                        java.lang.String key,
                                                        java.lang.String fieldName)
Given a key value, looks in the specified view and finds all documents containing the key value in the first sorted column within the view. For each selected document, @DbLookup returns the contents of a specified field if the fourth argument corresponds to a field name, or the content of a column if the fourth argument corresponds to a column number.


DbName

public abstract java.lang.String DbName()
Returns the name of the current database.


DbTitle

public abstract java.lang.String DbTitle()
Returns the label of the current database.


Element

public abstract com.ibm.jscript.types.FBSValue Element(com.ibm.jscript.types.FBSValue list,
                                                       int position)
Return the element of the list at the given position.


List

public abstract com.ibm.jscript.types.FBSValue List(com.ibm.jscript.types.FBSVariableArgs values)
Create a new value form the given values : if tehre several values, an array will be created. Note that if one of the values is a list, all elements of this list will be added to the returned array. (there is no included list) If there is only 1 simple argument, it is returned as a simple value.


Subset

public abstract com.ibm.jscript.types.FBSValue Subset(com.ibm.jscript.types.FBSValue list,
                                                      int length)
Extract from the given list from left to right the given number of values (length). If you specify a negative number, @Subset searches the list from right to left, but the result is ordered as from the beginning of the list.


Unique

public abstract java.lang.String Unique()
Returns a random, unique text value.


Unique

public abstract com.ibm.jscript.types.FBSValue Unique(com.ibm.jscript.types.FBSValue list)
Removes duplicate values from the given list.


Min

public abstract double Min(com.ibm.jscript.types.FBSVariableArgs values)
Returns the smallest number among the given arguments.


Max

public abstract double Max(com.ibm.jscript.types.FBSVariableArgs values)
Returns the greatest number among the given arguments.


Member

public abstract int Member(java.lang.String value,
                           com.ibm.jscript.types.FBSValue list)
Returns the position of the given value in the given string list. Returns 0 if the value is not contained in the given string list.


IsMember

public abstract int IsMember(java.lang.String value,
                             com.ibm.jscript.types.FBSValue list)
Returns 1 if the given list contains the given string. This function is case-sensitive.


IsMember

public abstract com.ibm.jscript.types.FBSValue IsMember(com.ibm.jscript.types.FBSValue value,
                                                        com.ibm.jscript.types.FBSValue list)
Returns 1 if all elements of the first list (value) are contained in the second list.


IsNotMember

public abstract int IsNotMember(java.lang.String value,
                                com.ibm.jscript.types.FBSValue list)

IsNotMember

public abstract com.ibm.jscript.types.FBSValue IsNotMember(com.ibm.jscript.types.FBSValue value,
                                                           com.ibm.jscript.types.FBSValue list)
Indicates if a text string (or a text list) is not contained within another text list. The function is case-sensitive.


Implode

public abstract java.lang.String Implode(com.ibm.jscript.types.FBSValue textList)
Concatenates all members of the given text list separated by a space and returns a text string.


Implode

public abstract java.lang.String Implode(com.ibm.jscript.types.FBSValue textList,
                                         java.lang.String sep)
Concatenates all members of the given text list separated by the given separator


Explode

public abstract com.ibm.jscript.types.FBSValue Explode(java.lang.String value)
Returns a string list composed by elements of the given string, each element in the given string are separated by space, comma or semicolon.


Explode

public abstract com.ibm.jscript.types.FBSValue Explode(java.lang.String value,
                                                       java.lang.String separators)
Returns a string list composed by elements of the given string, each element in the given string are separated by one the given separators


Explode

public abstract com.ibm.jscript.types.FBSValue Explode(java.lang.String value,
                                                       java.lang.String separators,
                                                       int incEmpties)
Returns a string list composed by elements of the given string, each element in the given string are separated by one the given separators If incEmpties is 1, an empty string ("") is placed in the returned list when a separator appears at the beginning or end of the string, or two separators appear consecutively in the string.


Explode

public abstract com.ibm.jscript.types.FBSValue Explode(java.lang.String value,
                                                       java.lang.String separators,
                                                       int incEmpties,
                                                       int newLineAsSeparator)
Returns a string list composed by elements of the given string, each element in the given string are separated by one the given separators If incEmpties is 1, an empty string ("") is placed in the returned list when a separator appears at the beginning or end of the string, or two separators appear consecutively in the string. If newLineAsSeparator is '1', a new line is considered as a separator.


Elements

public abstract int Elements(com.ibm.jscript.types.FBSValue list)
Returns the number of entries in the list, except null, undefined or empty string values.


Count

public abstract int Count(com.ibm.jscript.types.FBSValue list)
Returns the number of entries in the list.


Replace

public abstract com.ibm.jscript.types.FBSValue Replace(com.ibm.jscript.types.FBSValue sourceList,
                                                       com.ibm.jscript.types.FBSValue fromList,
                                                       com.ibm.jscript.types.FBSValue toList)
Performs a find-and-replace operation on a text list. The first argument is the source list, the second argument contains values to be replaced, and the third argument contains the values to put instead old values.


If

public abstract void If()
Evaluates a condition


Do

public abstract com.ibm.jscript.types.FBSValue Do(com.ibm.jscript.types.FBSValue values)
All the args are evaluated, return the last value


Return

public abstract void Return(com.ibm.jscript.types.FBSValue value)
Is equivalent to return statement.


IsWebClient

public abstract int IsWebClient()
Returns true.


ClientType

public abstract java.lang.String ClientType()
Returns "Web"


ComputeFields

public abstract void ComputeFields()
Recompute all fields in the current document