@For(n :=1; n<=@Elements(FirstName); n := n + 1;
FIELD FullName := @If(n=1;FirstName[n] + " " + LastName[n]; FullName :
(FirstName[n] + " " + LastName[n]))); FullName
If FirstName contains:
"John" : "Patty" : "Mary"
and LastName contains:
"Williams" : "Keats" : "Foster"
the result in the FullName field is:
"John Williams; Patty Keats; Mary Foster"Aus zwei einzelnen Listen Firstname und Lastname wird eine neue Liste Firstname + " " + Lastname gebildet.
Wenn der Schleifenzähler bei 1 ist, wird erstmalig ein String als erstes Element der neuen Liste gebildet, ansonsten wird das bisherige Ergebnis (in Fullname) um das neue Konstrukt erweitert.
Bernhard
Was macht z.B. die @If-Anweisung?Genau das habe ich beschrieben.
@If evaluates a condition; if the condition is True, Lotus Notes/Domino performs the action appearing immediately after that condition, and stops. If the condition is False, Lotus Notes/Domino skips to the next condition and tests it, and so on. If none of the conditions is True, Lotus Notes/Domino performs the else_action.
Syntax
@If( condition1 ; action1 ; condition2 ; action2 ; ... ; condition99 ; action99 ; else_action )
Parameters
condition
Expression that returns a Boolean. If this expression returns True, action is performed. If it's False, Lotus Notes/Domino skips to the next condition, if there is one. Otherwise, Lotus Notes/Domino performs else_action.
action
An action to be performed or a value to be returned if the governing condition returns True.
else_action
An action to be performed or a value to be returned if none of the conditions returns True.
Usage
In its simplest form, the If statement looks like this: @If( condition ; action ; else_action ).
You can list up to 99 conditions and corresponding actions, followed by just one action to be performed when all the conditions are False. As soon as a condition evaluates to True, Lotus Notes/Domino performs the associated action and ignores the remainder of the @If statement.