Lotus notes 使用LotusFormula更新列表元素

Lotus notes 使用LotusFormula更新列表元素,lotus-notes,lotus-formula,Lotus Notes,Lotus Formula,我试图用LotusFormula更新列表中的一个元素 我以为你会这样做: x := "0":"0":"0"; x[1] := "1"; 但是,当我尝试保存时,会出现以下错误: := must be immediately preceded by a field or variable name 从: 无法使用下标运算符 在作业的左边 陈述也就是说,您不能分配 下标元素的值。你 必须建立完整的列表,然后 分配它。例如,如果是类别 是一个三元素列表,您希望 为元素2指定一个新值: 您通常可以通过

我试图用LotusFormula更新列表中的一个元素

我以为你会这样做:

x := "0":"0":"0";
x[1] := "1";
但是,当我尝试保存时,会出现以下错误:

:= must be immediately preceded by a field or variable name
从:

无法使用下标运算符 在作业的左边 陈述也就是说,您不能分配 下标元素的值。你 必须建立完整的列表,然后 分配它。例如,如果是类别 是一个三元素列表,您希望 为元素2指定一个新值:

您通常可以通过使用@inpode、@Explode或@Replace获得。但如果你真的需要它,你可以这样做:

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
REM{FieldName[Index]:=NewVal};
指数:=2;
NewVal:=“CatNew”;
maxIndex:=@元素(字段名);
准备:=@If(索引>1;@Subset(字段名;索引-1);“”);
后置部分:=@If(索引
来自:

无法使用下标运算符 在作业的左边 陈述也就是说,您不能分配 下标元素的值。你 必须建立完整的列表,然后 分配它。例如,如果是类别 是一个三元素列表,您希望 为元素2指定一个新值:

您通常可以通过使用@inpode、@Explode或@Replace获得。但如果你真的需要它,你可以这样做:

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
REM{FieldName[Index]:=NewVal};
指数:=2;
NewVal:=“CatNew”;
maxIndex:=@元素(字段名);
准备:=@If(索引>1;@Subset(字段名;索引-1);“”);
后置部分:=@If(索引
我增强了公式,以避免在Index=1或Index=maxIndex时出现潜在错误。我增强了公式,以避免在Index=1或Index=maxIndex时出现潜在错误