Looking up and Converting a List of Notes Names into their Email Address


result := "";
realresult := "";
@For (n := 1;n <= @Elements (Members );n := n + 1;
look := @Trim ( @NameLookup ( [Exhaustive];Members [n ]; "InternetAddress" ) );
realresult := @Trim ( @Unique (realresult:look ) );
result := @Trim ( @Unique (result : @If (look= "";@Name ( [Abbreviate];Members [n ] );look ) ) ) );

FIELD comment := @Implode (result;@NewLine );

@Prompt ( [Ok]; "Members " + @Text ( @Elements (Members ) ); "Found " + @Text ( @Elements (realresult ) )+ " emails for "+ @Text ( @Elements (Members ) )+ " Notes Names" )
All code submitted to OpenNTF XSnippets, whether submitted as a "Snippet" or in the body of a Comment, is provided under the Apache License Version 2.0. See Terms of Use for full details.
No comments yetLogin first to comment...