There are a variety of functions that can be used to parse text strings. This section illustrates the @RightBack, @LeftBack, and @Word functions to retrieve a subset of text from a text string.
How It Works
The following describes a few of the Formula Language functions that can be used to parse text strings.
@Rightback Returns the right-most characters from a string based on a specified delimiter or starting character position. The delimiter could be a single character, such as a comma, or several characters, such as "Record=".
@Leftback Returns the left-most characters from a string based on a specified delimiter or starting character position.
@Word Returns a specific word from a text string based on a specified delimiter and word to return.
ImplementationExample 1
The following illustrates the @Rightback command (see Figure 14.16).
myString := "Mark Elliott"; myResult := @RightBack(myString; " "); @Prompt([Ok]; "RightBack with space delimiter"; "Initial string: " + myString + @NewLine + "Result string: " + myResult)
Figure 14.16. Example of the @Rightback function
ImplementationExample 2
The following illustrates the @Leftback command (see Figure 14.17).
myString := "Mark Elliott"; myResult := @LeftBack(myString; " "); @Prompt([Ok]; "LeftBack with space delimiter"; "Initial string: " + myString + @NewLine + "Result string: " + myResult)
Figure 14.17. Example of the @Leftback function
ImplementationExample 3
The following illustrates the @Word command (see Figure 14.18).
myString := "Mark Elliott"; word1 := @Word(myString; " "; 1); word2 := @Word(myString; " "; 2); @Prompt([Ok]; "Word using a space delimiter"; "Initial string: " + myString + @NewLine + "Word 1: " + word1 + @NewLine + "Word 2: " + word2)
Figure 14.18. Example of the @Word function
An Introduction to the Lotus Domino Tool Suite
Getting Started with Designer
Navigating the Domino Designer Workspace
Domino Design Elements
An Introduction to Formula Language
An Introduction to LotusScript
Fundamentals of a Notes Application
Calendar Applications
Collaborative Applications
Reference Library Applications
Workflow Applications
Web Applications
Design Enhancements Using LotusScript
Design Enhancements Using Formula Language
View Enhancements
Sample Agents
Miscellaneous Enhancements and Tips for Domino Databases
Data Management
Security
Application Deployment and Maintenance
Troubleshooting
Appendix A. Online Project Files and Sample Applications
Appendix B. IBM® Lotus® Notes® and Domino®Whats Next?