Sort / Group Docs in Number Ranges in View

Mindwatering Incorporated

Author: Tripp W Black

Created: 11/14/2003 at 05:50 PM

 

Category:
Notes Developer Tips
Formulas, View Columns

The following code used in a categorized column allows you to display/sort documents in numerical ranges or grouping categories.

In the following example, DocNo is a number in text format. It is converted and then put into a range. (e.g. 10-19)

tmp1:=@TextToNumber(DocNo);
tmp2:=@If(@IsError(tmp1); 0; tmp1);
tmprange:=@Integer(tmp2/10)*10;
tmp:=@Text(tmprange) + "-" + @Text(tmprange + 9);
"" + tmp + ""


previous page