Working with Lists

The following are common functions used to manage a list of values.


[Pages 109 - 110]

Function

Description

Example

@Elements

Counts the number of items in a list and returns a number. Syntax:

@Elements ( list );
 

listA list of elements.

@Elements
 ("April":"May":"June");
 

Result: 3

@Explode

Converts a text string into a list of elements. You can optionally specify a string delimiter. If a string delimiter is not specified, the function will default to a space, semicolon, or comma. Syntax:

@Explode ( string );
@Explode ( string; delimiter);
 

stringA string of text values.

delimiterAn optional text string separator.

Data:="April May June";
@Explode (Data;" ");
 

Result: "April": "May": "June"

@Implode

Converts a list of elements into a single text string. Optionally, you can specify a string delimiter. Syntax:

@Implode (list);
@Implode (list; delimiter);
 

lista list of elements.

delimiteran optional text string separator.

Data:= "April": "May":
 "June";
@Implode (Data;" ");
 

Result: "April May June"

@IsMember

Searches for a value within a text string. Returns a numeric 1 if found and 0 if not found. Syntax:

@IsMember (string; list);
 

stringThe search string.

listA list of elements.

Data:= "April": "May": "June";
@IsMember ("April"; Data);
 

Result: 1

@Replace

Searches a list for an element. If the element is found, it is replaced with the new element.

@Replace (searchlist; oldlist; newlist);
 

searchlistThe list of elements to be searched.

oldlistThe list of value(s) to be replaced.

newlistThe new list of replacement value(s)

Data:= "April": "Dec":
 "June";
@Replace (Data; "Dec";
 "May");
Result: "April": "May":
 "June"
 

@Select

Returns the value specified in the n-th number position. If the number specified is greater than the total values, then the last value is returned. Syntax:

@Select (number; value1; value2; valueN);
 

numberItem number to select.

value1First value.

value2Second value.

valueNLast value.

@Select(3; "April";
 "May"; "June")
 

Result: "June"

@Word

Selects the word specified in the n-th number position. Words are determined based on the string delimiter. Syntax:

@Word (string; delimiter; number);
 

stringThe string to be searched.

delimiterThe value used to separate "words."

numberThe word to select from the search string.

Data:="April~May~June";
@Word (Data; "~"; 3);
 

Result: "June"


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?



Lotus Notes Developer's Toolbox(c) Tips for Rapid and Successful Deployment
Lotus Notes Developers Toolbox: Tips for Rapid and Successful Deployment
ISBN: 0132214482
EAN: 2147483647
Year: N/A
Pages: 293
Authors: Mark Elliott

Flylib.com © 2008-2020.
If you may any questions please contact us: flylib@qtcs.net