I have several computed for display fields on a web form with @dblookup on multiple
value key (@DbLookup(“” : “Cache”; “”: db; “ByItemNo”; key; 2) where key is a multiple
value field).
If one of the values in the key is not found by the @Dblookup, an error is return
and Dblookup not performed for the rest of the values in the key.
So, I came up with a @for formula for the fields:
key:= ItemNo_1;
@If(key = “”; @Return(“”); “”);
db := dbfilepath_notes + @Trim(“// “) + productlistdb;
@?(n ? 1;
n <= @Elements(key);
n ? n + 1;tmp?tmp:@If(@IsError(@DbLookup(”” : “NoCache”; “”: db; “ByItemNo”; keyFIELDn;2
));“{Item Not Available]”;@DbLookup(“”: “NoCache”
;“” :db ;“ByItemNo” ;key FIELDn;2) ));
@Trim(tmp)
Which works very well, accomplishes what I wanted: for the items not found, add “Item
not available”, for the items found retreive description.
Question: would the @ for and @dblookup impact performance. I am talking about lookups
on an average of 300 items. Is there documentation for the comparative times of @for
and @dblookup?