Converting Regular Common Name Lists into Notes Hierarchical Names
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.
Admin Scripts
Keith Brooks
You have to login first to use 'My Favorites' feature
1 user(s) has marked as favorite:
Keith Brooks
Added 2021-Jan-18
Looking up and Converting a List of Notes Names into their Email Address
When asked to pull the email names for a list of Notes names so marketing could export them to an outside mailing list, I figured there had to be a better way than looking them up individually. Luckily, there is.
This version owes a hat tip and thanks to the inspiration code from the amazing Stephan Wissel and this post of his: https://www.wissel.net/blog/2011/10/converting-notes-names-into-internet-addresses.html
I had to adjust the code over time a little bit but I also want to give credit where it is deserved.
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 Email Addresses.
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 (toolbar_ccmail.gif icon perhaps?) or whatever will be unique for you to notice it.
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 names to get emails 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 emails for everyone in the Comments & Attachments section.
Cool, right? I taught AA's how to use this and they love it and never bother me anymore.
If you used this and it helped you great! Please rate it and let me and Stephen know you used the code.
I am @Lotusevangelist and Stephan is @notessensei on Twitter
Admin Scripts
Keith Brooks
Overall rating is 5.00 by 1 person(s)
You have to login first to use 'My Favorites' feature
1 user(s) has marked as favorite:
Keith Brooks
Added 2021-Jan-17
Create a Forwarding Address in a Person Doc based on Email Address
This is a simple thing, but one that is very valuable, especially when doing domain changes, email migrations or corporate mergers.
The important piece which people forget is what to do when the syntax is caps or lower case.
This script solves that problem by setting the existing email to lowercase.
Instructions:
NOTE: Presumes you already have your Directory/NAB (Names.nsf) open
1) From the Notes top menu, click on Create, then click on Agent. In the window that opens, give the agent a name and description
2) Select FORMULA
3) Copy then paste in the code
4) Edit the existigname.com to your domain (ex: lotusrocks.com)
5) Edit the newname.com to the new domain (ex: hclrocks.com)
6) Save your agent
7) Test the agent by going back to your Directory and go to a test person in the list of users
8) Click on Action from the Notes Menu and find your new Agent and click on it to run it
9) Open the person doc and see if all looks good, if not, check your syntax
Admin Scripts
Keith Brooks
You have to login first to use 'My Favorites' feature
1 user(s) has marked as favorite:
Keith Brooks
Added 2020-Dec-15
Volt Audit Trail
This can be used to add an audit to a Multi-line entry field, as HTML. To do so:
1. Add a Multi-Line Entry field, and hide on all occasions (e.g. add a rule to "Show" if "Window height in pixels" "Has no value"). Call it "F_AuditText".
2. Add an HTML field below, calling it "F_HTMLAudit".
3. In the page's onShow event, use: page.F_HTMLAudit.setContent(BO.F_AuditText.getValue(). This takes the HTML values stored in "F_AuditText" and renders the HTML on the page, obviously read-only.
4. In your submit buttons or wherever else you want to add to the audit, call:
BO.F_AuditText.setValue(app.getSharedData().addAudit('Submitted') + BO.F_AuditText.getValue()
This gets an audit message "Submitted" and prepends it to the existing audit messages. The audit messages appear most recent first.
JavaScript (Volt)
Paul S Withers
Overall rating is 5.00 by 2 person(s)
You have to login first to use 'My Favorites' feature
So far, no one has added to favorites
Added 2020-Jul-12
Get list of groups user belongs to
Utils.getSession().getUserGroupNameList() will return the groups the user in context belongs to. I use the code above to get a list of groups for a user who is not in the context.
Java
Patrick Kwintensson
You have to login first to use 'My Favorites' feature
So far, no one has added to favorites
Added 2020-May-13
Change OSGI_HTTP_DYNAMIC_BUNDLES in Notes.ini from LotusScript
Call this agent with Agent.RunOnServer to change the value of OSGI_HTTP_DYNAMIC_BUNDLES on a Domino server without using a server configuration document and a server reboot.
OSSetEnvironmentVariableExt with isSoft=true lets the method only a check an internal hard list for forbidden variables, allowing OSGI_HTTP_DYNAMIC_BUNDLES to be changed.
LotusScript
Karsten Lehmann
Overall rating is 5.00 by 1 person(s)
You have to login first to use 'My Favorites' feature
So far, no one has added to favorites
Added 2020-Jan-23
Set/reset LogStatusBar environment variable when needed
When you want to start logging to log.nsf, just put
Dim h As New LogHelper
and delete the object when you want to stop logging.
LotusScript
Sjef Bosman
Overall rating is 5.00 by 1 person(s)
You have to login first to use 'My Favorites' feature
So far, no one has added to favorites
Added 2019-Apr-25
Convert NotesJSONElement.Type value to String
NotesJSONElement.Type returns an integer. This converts it to meaningful text
LotusScript
Paul S Withers
You have to login first to use 'My Favorites' feature
So far, no one has added to favorites
Added 2019-Apr-01
Changing Input to Select in Profiles
This changes the "Building" label and field to be for "Department", giving a comboBox of selections. This still saves the value to the "bldgId" field, and marks as selected the value that's stored.
It requires the values to exist in the list, or the first is selected as the default. If you need to change existing field values, use the Connections APIs or Node-RED nodes to do so.
JavaScript (Connections Customizer)
Paul S Withers
You have to login first to use 'My Favorites' feature
So far, no one has added to favorites
Added 2019-Mar-29
Client-side radio-button validation
Could also be done by hijacking XSP.getFieldValue and checking the type 'fieldset' before calling the original getFieldValue.
IMHO this code (or better) should be incorporated in the XSP files.
JavaScript (Client)
Sjef Bosman
Overall rating is 5.00 by 1 person(s)
You have to login first to use 'My Favorites' feature
So far, no one has added to favorites
Added 2019-Mar-15
Base Href for XPages Applications
Thanks to Jesse Gallagher for pointing me in the direction of this one.
If you use Bootstrap themes, links tend to be basicLeafNodes with client-side URLs set via the href property to avoid unnecessary requests to the server to perform a partial refresh. After all, we want to change the URL, so why not just do so directly from the browser. But if you set href to e.g. "/newSnippet.xsp" and set the launch properties of the database to launch a specific page, e.g. "home.xsp", the starting URL in the browser may be ".nsf", it may be ".nsf/" or it may be ".nsf/home.xsp". This means "/newSnippet.xsp" means different things.
This Snippet sets the base URL so that "/newSnippet.xsp" in the basicLeafNode will always work.
XPages
Paul S Withers
Overall rating is 5.00 by 2 person(s)
You have to login first to use 'My Favorites' feature
So far, no one has added to favorites
Added 2019-Feb-25
Add branding to application layout control with Bootstrap theme
an item with the navbar-brand class is not part of the control. here is a way to add it onload via jQuery (ref https://getbootstrap.com/docs/3.3/components/#navbar)
JavaScript (Client)
Patrick Kwintensson
You have to login first to use 'My Favorites' feature
So far, no one has added to favorites
Added 2019-Feb-12
Type Ahead search from Active Directory
Simple typeahead in XPages that looks up people from Active directory as you type. you need to customize the java class so that search path match where you want to search in AD and what fields in AD you want to return.
Use ADExplorer (windows app) to find your path.
Java
Thomas Adrian
Overall rating is 5.00 by 2 person(s)
You have to login first to use 'My Favorites' feature
So far, no one has added to favorites
Added 2019-Feb-11
Simple client side validation using jQuery
use this snippet as a starting point for a simple validation using jQuery, customize it using your own field names.
if the validation fails we highlight the field and cancel any server side code
JavaScript (Client)
Thomas Adrian
Overall rating is 5.00 by 1 person(s)
You have to login first to use 'My Favorites' feature
So far, no one has added to favorites
Added 2019-Jan-28
Programmatic access to IDVAULT ( incl. new V10 methods )
The code allows programmatic access to the IDVAULT. It uses the NotesIdVault class ( new with 901 FP9 ) and also extends the class to extract an ID from the vault without knowing its password.
The code also includes new features that come with V10 to archive, revert archived Ids and to delete Ids that have been archived to reinforce sync.
SAMPLE USAGE:
This sample shows how to extract an ID from the vault document. It will apply a new password to the ID but leaves the ID in the document untouched.
Option Declare
Use "IDVault"
Sub Initialize
Dim idv_db As NotesIdVaultDb
Dim bck_db As NotesIdVaultDb
Dim vaultServer As String
Dim vaultDb As String
Dim vaultDb_backup As String
vaultServer = "develop1/gotham"
vaultDb = "IBM_ID_VAULT\batcave.nsf"
vaultDb_backup = "IBM_ID_VAULT\batcave_bck.nsf"
Dim idv_doc As NotesIdVaultDocument
Set idv_db = New NotesIdVaultDb(vaultServer, vaultDb)
If ( idv_db.IsConnected() ) then
Set idv_doc = New NotesIdVaultDocument(idv_db.db,nothing)
Set bck_db = New NotesIdVaultDb(vaultServer, vaultDb_backup)
If ( bck_db.IsConnected() ) Then
Set idv_doc = New NotesIdVaultDocument(idv_db.db, bck_db.db)
Else
Set idv_doc = New NotesIdVaultDocument(idv_db.db, Nothing)
End If
idv_doc.ServerName = vaultServer
idv_doc.UserName = "cn=Harvey Dent/o=gotham"
idv_doc.Password = "hdent003"
idv_doc.IdFilePathName = "C:\Notes\Data\ids\people\backup\hdent_with_new_pwd.id"
'Call idv_doc.ResetPassword()
'Call idv_doc.archiveIDFile()
'Call idv_doc.revertArchivedIDFile()
'Call idv_doc.deleteArchivedIDFile()
'Call idv_doc.IdFileGet()
'Call idv_doc.IdFileSync()
'Call idv_doc.IdFilePut()
Call idv_doc.IdFileExtract()
'Call idv_doc.markInactive()
'Call idv_doc.markActive()
MsgBox idv_doc.LastErrorString
End if
End Sub
LotusScript
Ulrich Krause
Overall rating is 5.00 by 2 person(s)
You have to login first to use 'My Favorites' feature
1 user(s) has marked as favorite:
Ulrich Krause
Added 2018-Sep-07