I have some code, it copies the SendTo field into INetSendTo.Then, we do some processing, ending with a prompt which contains the Internet mail address…
The field INetSendTo needs to be set to all the values that are returned by the Prompt, e.g. the prompt appears once for each email address: and I want to put these email address’s into a field…this doesn’t work:
@If(INetSendTo!=“.”;“”;
@Do(
@SetField(“INetSendTo”; SendTo)));
FIELD SendTo:=SendTo;
n := 1;
@While(n <= @Elements(SendTo);
database := @Subset(@DbName; -1);
server := @Name([CN]; @Subset(@DbName; 1));
noteslookup:=@If(server=“”;
@DbLookup(“Notes”:“”; “”:NAMES.nsf;“People”;@Name([CN];SendTo[n]);“InternetAddress”);
@DbLookup(“Notes”:“”;“85255F7E:006775B0”;“($NamesFieldLookup)”; @Name([CN];SendTo[n]);“InternetAddress”));
Addr821:=@If(@Contains(SendTo[n];“CN=”);
noteslookup;
@Name([Address821];SendTo[n]));
ABSendTo:=@If(@Contains(Addr821;"@companyname.com");Addr821;INetSendTo[n]);
FIELD INetSendTo := INetSendTo : INetSendto[n];
@Prompt([Ok];“Email” + @Text(n); "The external email is " + ABSendTo + “.”);
n := n + 1)
Its this line thats not working:
FIELD INetSendTo := INetSendTo : INetSendto[n];
But how to fix, almost need to append to a field using formula?