De l'Lotus Domino Designer 7 Help:
The subscript operator cannot be used on the left side of an assignment statement. That is, you cannot assign a value to a subscripted element. You must build the complete list and then assign it. For example, if Categories is a 3-element list and you want to assign a new value to element 2:
FIELD Categories := Categories[1] : "CatNew" : Categories[3]
Vous pouvez usuall y obtenez en utilisant @Implode, @Explode, ou @Replace. Mais si vous en avez vraiment besoin, vous pouvez le faire:
REM {FieldName[Index] := NewVal};
Index := 2;
NewVal := "CatNew";
maxIndex := @Elements(FieldName);
PrePart := @If(Index > 1; @Subset(FieldName; Index-1); "");
PostPart := @If(Index < maxIndex; @Subset(FieldName; (Index-maxIndex)); "");
Field FieldName := PrePart : NewVal : PostPart
J'ai amélioré la formule pour éviter une erreur potentielle lorsque Index = 1 ou Index = maxIndex –