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.
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))
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.