Prior to reading this post you might want to take a quick read through my previous post Lotus Now in my example I am feeding Profiles completely out of a Domino LDAP which is completely under my control as it is my sandbox, but in the real world you might be taking data in from other sources, an HR system for example where you can not dictate how they store data, so we need a more elegant solution then simply making sure the source data is in lower case. So in our example here is a view of a users ldap record (using LdapBrowser a very handy utility to keep around, scroll down on the page for the free client)
As you can see here the “c” attribute is populated with US in uppercase If we simply use the default mapping in the Database Population Wizard
The user table will be populated in uppercase as seen here
Which means when we go in to Profiles and view Alex P. Keaton’s Profile, we will not see his country displayed since US does not exist in the Country table (us is there but not US)
Not the result we were looking for. To fix this we are going to add a function in to ‘profiles_functions.js’ which is in the TDI Solutions Directory (TDIPopulationTDISOL under the database Wizards directory) and here is the function I am adding (and bear in mind I am NOT a developer) // Convert country field to lower case function function_map_country_lowercase(fieldname) { var result = work.getString(“c”); if(result != null) { result=result.toLowerCase(); } return result; } Once you have saved your function, you can either manually edit the “map_dbrepos_from_source.properties” in the TDI Solutions Directory so it looks like this PROF_ISO_COUNTRY_CODE={function_map_country_lowercase} Or run the Wizard again and use the Function Pick list where you will see your new function as seen here
Once the wizard completes even though our source is still providing US in upper case we are writing us in lower case to the database
Now when we load up Alex P. Keaton’s Profile we have his country displayed as we expected
This is just one example, using a custom Javascript you can easily manipulate any source data to write it out to the Profiles database correctly to suit your needs. Additional Resources Using the Profiles population wizard Mapping fields manually Tivoli Directory Integrator V6.1 InfoCenter IBM Tivoli Directory Integrator Users Group
Good stuff Mitch! I though AKP was the CEO, though?