Notes/Domino Fix List
SPR # JBAS5JGSTPFixed in 6.0.1 CF3; 6.0.2 CF2; 6.0.3 releaseRegression in 6.0



Product Area: Designer; R5/R6 Interoperability Technical Area: @functions Platform: Cross Platform

SPR# JBAS5JGSTP - Fixed a problem introduced in 6.0, where an empty string was always returned when using @MiddleBack. This problem has been fixed in 6.0.3, 6.0.2 CF2, and 6.0.1 CF3.

Technote Number: 1104692

Problem:
This issue was reported to Lotus Software Quality Engineering, and was
addressed in these Notes Client releases: 6.0.1 CF3, 6.0.2 CF2 and 6.0.3.

Excerpt from the Lotus Notes and Domino Release 6.0.1 CF3, 6.0.2 CF2 and 6.0.3
MR fix lists (available at http://www.lotus.com/ldd):

@functions
SPR# JBAS5JGRUJ - Fixed a problem introduced in 6.0, where an empty string was
returned when using @Middle. For example, in the formula @Middle("abc" ; 0 ;
"x"), "abc" should have been returned, but an empty string was returned. This
problem has been fixed in 6.0.3, 6.0.2 CF2, and 6.0.1 CF3.


Workaround:
Use the @If function and a temp variable to determine if "" was returned, and
if so return the input string instead.

For example:
In either Release 5 or Release 6 the @If will return the expected "John
Doe/Widgets" when the inputstring value is "John Doe/Widgets".

temp1:=@Middle(inputstring; 0; "@");
@If(temp1=""; inputstring; temp1);


Supporting Information:
An example of the behavior when the string is found:

Given: @Middle("John Doe/Widgets@Widgets", 0, "@")
In Notes R5 and Notes 6 the above returns "John Doe/Widgets"

This information from the documentation explains the parameters for the
functions:

Returns any substring from the middle of a string. The middle is found by
scanning the string from left to right, and parameters determine where the
middle begins and ends.

Syntax
@Middle( string ; offset ; numberchars )
@Middle( string ; offset ; endstring )
@Middle( string ; startString ; endstring )
@Middle( string ; startString ; numberchars )

Parameters
string
Text. Any string.

offset
Number. A character position in string that indicates where you want the middle
to begin, always counting from left to right. The middle begins one character
after the offset.

startString
Text. A substring of string that indicates where you want the middle to begin,
always counting from left to right. The middle begins one character after the
end of startString.

numberchars
Number. The number of characters that you want in the middle. If numberchars is
negative, the middle starts at offset or startString and continues from right
to left. If numberchars is positive, the middle starts one character past the
offset or startString and continues from left to right.

endstring
Text. A substring of string that indicates the end of the middle. @Middle
returns all the characters between offset and endstring or between startString
and endstring.

Return value
middle
Text. The substring from the middle of string, which begins at the offset or
startString you specify and ends at the endstring you specify, or after the
numberchars have been reached

<< External Link Removed >>Returns any substring from the middle of a string.
The middle is found by scanning the string from right to left, and parameters
determine where the middle begins and ends.

Syntax
@MiddleBack( string ; offset ; numberchars )
@MiddleBack( string ; offset ; endstring )
@MiddleBack( string ; startString ; endstring )
@MiddleBack( string ; startString ; numberchars )

Parameters
string
Text. Any string.

offset
Number. A character position in string that indicates where you want the middle
to begin, always counting from right to left. The middle begins one character
after the offset.

startString
Text. A substring of string that indicates where you want the middle to begin,
always counting from right to left. The middle begins one character after the
end of startString.

numberchars
Number. The number of characters that you want in the middle. If numberchars is
negative, the middle starts at offset or startString and continues from right
to left. If numberchars is positive, the middle starts one character past the
offset or startString and continues from left to right.

endstring
Text. A substring of string that indicates the end of the middle. @MiddleBack
returns all the characters between offset and endstring or between startString
and endstring.

Return value
middle
Text. The substring from the middle of string, which begins at the offset or
startString you specify and ends at the endstring you specify, or after the
numberchars have been reached.
More >



Last Modified on 03/03/2010

Go back