Manage Learn to apply best practices and optimize your operations.

Pull a specific element from a list

If you are given a list of items, do you know how to pull out the 1st, 2nd, 3rd, 4th, etc. elements? This tip shows you how.

VIEW MEMBER FEEDACK TO THIS TIP

If you are given a list of items, do you know how to pull out the 1st, 2nd, 3rd, 4th, etc. elements? This tip shows you how.

Assume that AdjusterList is a list of people's names, and that AdjCount is the number of elements in the list:

Computed formula for AdjCount: 
@Elements(AdjusterList)

To get the 2nd adjuster in the list, use:
AdjNum:=2;
tempadj:=@Subset(@Subset
(AdjusterList;-(AdjCount-(AdjNum-1)));1);
@If(AdjNum>AdjCount;"";
@If(@IsError(tempadj);"";tempadj))

To get the 3rd adjuster in the list, use: 
AdjNum:=3;
tempadj:=@Subset(@Subset
(AdjusterList;-(AdjCount-(AdjNum-1)));1);
@If(AdjNum>AdjCount;"";
@If(@IsError(tempadj);"";tempadj))
  

MEMBER FEEDBACK TO THIS TIP

A simple way to pull out an element from a list is to use List[n] formula. For example, if you put this formula in a computed text = AdjusterList[1] it will give you element number 1.
—Glenn L.

Do you have comments on this tip? Let us know.

This tip was submitted to the SearchDomino.com tip exchange by member Tandy Wine. Please let others know how useful it is via the rating scale below. Do you have a useful Notes/Domino tip or code to share? Submit it to our monthly tip contest and you could win a prize and a spot in our Hall of Fame.

Dig Deeper on Lotus Notes Domino Formula Language

SearchWindowsServer

Search400

  • Favorite iSeries cheat sheets

    Here you'll find a collection of valuable cheat sheets gathered from across the iSeries/Search400.com community. These cheat ...

  • HTML cheat sheet

    This is a really cool cheat sheet if you're looking to learn more about HTML. You'll find just about everything you every wanted ...

  • Carol Woodbury: Security

    Carol Woodbury

SearchDataCenter

SearchContentManagement

Close