Domino Code Fragment

Code Name*
DBLookup for a Range of Values
Date*
04/29/2024
Source (or email address if you prefer)*
Rlatulippe@romac.com
IP address:.3.134.77.195
Description*
To use a DBLookup to return a text field (i.e. Approver for a specified dollar amount) which relates to a range of values, follow this tip: Your criteria: Low Amount High Amount Approver
$0 $499 Bill Smith
$500 $2,499 Fred Jones
$2,500 $4,999 Mike Williams
$5,000 Joe Smith
Set up the view this way: Column1: Formula: @Text(LowAmount)+"@"+ApproverName 0@Bill Smith
500@Fred Jones
2,500@Mike Williams
5,000@Joe Smith
Type*
Formula
Categories*
(Misc)
Implementation:
Required Client:
Server:
Limitations:
Comments:
Files/Graphics attachments (if applicable): Code:
Formula to Find Approver:
LOOK := @DbColumn(""; ""; VIEW; 1);
LOW := @TextToNumber("0" + @Word(LOOK; "@"; 1)) -1;
NAMES := @Word(LOOK; "@"; 2);
A := @Left(@Text(LOW - AMOUNT); 1);
@Subset(@Trim(NAMES : @Right(A + NAMES; "-")); -1);