Unimportant - but I just wondered - Evaluate

Hi,I just wondered what the ‘doc’ refers to at the end of an evaluate statement.

I find the syntax of it somewhat confusing…

This occours on Notes 6.0.2 CF1 using a Windows 2000 PC…

Example.

This statement I was trying to use to evaluate doesn’t work:-

result = Evaluate (|(@DbLookup(“”:“NoCache”; “” : “” ; “(Customer)” ; Comp ; 12)|)

But, searching the 4/5 Forum (theres lots of useful answers on there still :slight_smile: I came across this formula, which fixes it:-

eval = Evaluate({@DbLookup( “” : “NoCache” ; “”:“” ; “(Customer)” ; Comp ; 12 )}, doc)

Was it ‘just’ my syntax that was wrong? Or does this Evaluate function require the ,doc parameter at the end? If so, why, and is this just the current document (assuming that you have declared it as such)…

It’s not that important, but I was just interested, any ideas?

Ta

Subject: Unimportant - but I just wondered - Evaluate

The Evaluate statement in Domino Designer has the following syntax:

returnValue = Evaluate( notesFormula [, notesObject ] )

NotesFormula is a string variable, expression, or constant.

notesObject is optional and provides context for the formula; for example, if the formula accesses a field, notesObject must be the NotesDocument object that contains that field.

returnValue is an array in which the type and number of elements reflect the formula result; a scalar value is returned to element 0 of the array. You should use a variant for the return value, since you may not know how many elements are being returned.

Subject: Please don’t use Unimportant in the Subject … Oh - nevermind :wink: