get hostname in lotus notes using @formula

4.5k views Asked by At

get hostname in lotus notes using @formula. for eg. http://WDLR11/sample.nsf/burntest.xsp.I want to get the WDLR11

1

There are 1 answers

3
LRE On

You could start with @ServerName. It'll return a canonicalized name that includes the server name (eg: cn=WDLR11/ou=servers/o=someorg). Wrapping @Name around that will allow you to get what you want (ie: @Name( [cn]; @ServerName ); would return "WDLR11" in this example ).

The thing to note is if your server is actually cn=AServer/ou=servers/o=someorg running on host WDLR11, you'll need to publish an internal dns entry for AServer so your computed url ( http://AServer/sample.nsf/burntest.xsp ) will still work.

Failing that you could do some lookups into the server's Domino Directory (names.nsf) and pull the host name out of the server config but that's only worth doing if @ServerName doesn't give you what you want.