Converting Regular Common Name Lists into Notes Hierarchical Names
||January 18, 2021 at 7:29 AM
||I prefer to have people in Notes format in groups because no one knows the future, although the names will work in a simple one domain network, there is always something new down the road and the names should be in a proper format.
When given a new application to push out and an ACL with long lists of people, this will do the lookups for you in a few seconds, once you set this up for yourself.
This script works with your PNAB (Personal Name and Address Book) also called contacts list and is the local Notes client names.nsf file.
HOW TO USE THIS CODE:
This will create a button in your Toolbar.
1. Go to File->Preferences->Toolbar->Customize from your Notes client.
2. From the top box, I customize the Universal toolbar so select it from the dropdown.
3. Below the window box of icons, Click on New->Button.
4. Give it a Caption text, I used: Get Notes Names.
5. Popup Help text really is the name that shows when you hover over the icon, I would just repeat the name used in Step 4.
6. Change the icon to something either meaningful to you or whatever will be unique for you to notice it, I use a yellow ball.
7. Paste the code from the code box on this page into the Formula box of your Toolbar Icon window.
8. Click Ok.
9. Click Save Toolbar.
10. Click Ok.
That concludes the code part of this snippet.
HOW TO USE THE CODE:
1. If you don't have the Universal Toolbar showing by default, turn it on by going to View->Toolbar and clicking on Universal.
2. Open your PNAB (Personal Address Book), also called Contacts of your Notes client, it is usually the names.nsf file.
3. Click on Groups from the list of options in your Contacts.
4. Click on New to create a new Group.
5. You can name it anything, I keep a generic empty group for this purpose and call it Converts.
6. In the main field, copy and paste the list of names to get Notes Names from your company NAB/Directory.
7. Click Save and Close.
8. Now with the group you created highlighted/selected, click on the Icon created in the toolbar we created earlier.
9. You will receive a pop-up window one completed stating Found XX emails for XX Notes Names. This is important so you know if you got everyone or if you had any typing mistakes or people who may have left the company.
10. Now if you open the group you will see the Notes Names for everyone in the Comments & Attachments section and can copy and paste those into the new ACL groups or whatever your need.
If you used this and it helped you great! Please rate it and let me know you used the code. I am @Lotusevangelist on Twitter
This was put together with the help of fellow IBM Champions and HCL Ambassadors a long time ago and Jesse Gallagher when I edited this for verification about some questions I had at the time.
result := "";
@For(n := 1;n <= @Elements (Members );n := n + 1;
look := @Trim( @NameLookup ( [Exhaustive];Members [n ]; "FullName" ));
result := @Trim( @Unique (result : @If (look= "";@Name ([Abbreviate];Members[n ]); @Name ([Abbreviate];look)))));
FIELD comment := @Implode (result;@NewLine );
@Prompt([Ok]; "Members " + @Text(@Elements (Members )); "Found " + @Text(@Elements(result ))+ " Abbreviated Canonical Names for "+ @Text ( @Elements (Members ) )+ " Users" )