Monday, May 21, 2007

Creating a long numeric list with Notes @Formula

Well, I used to be able to write @formula functions like this in my sleep.
But once Lotusscript came out I stopped writing "complex" @formulas like this so forgot how to do it. Then one day when I needed a list like this it took me over an hour searching the old Notes 4/5 forums to find it. So I thought I'd put it here in case I ever need it again.

To create a long list of numbers (say sequential from 0-99) use this formula:

digitList := 0 : 1 : 2 : 3 : 4 : 5 : 6 : 7 : 8 : 9;
LongList := @TextToNumber(@Text(digitList) *+ @Text(digitList));

If you only need say from 0-48 then do:
@Subset(LongList; 48)

If you want 48 but starting at 1 rather than 0 then:
@Subset(@Subset(LongList; 49); -48);