OpenNTF.org - Database Properties at a glanc
My Links (Not logged in)
Code Bin Search
 
Hosted by Prominic.NET
Rate This Code
5 - brilliant stuff
4 - very nice
3 - average
2 - needs work
1 - bad
   OpenNTF Code Bin
About This Code
Brief Description:
Database Properties at a glance to copy Title / Server / Filename 
Rating:
Not Rated Yet 
Contributor:
Jim Romaine 
Category:
Lotus Formula 
Type:
Example Code 
Document Release:
1.01 
Notes Version:
R4.x, R6.x, R5.x, R7.x 
Last Modified:
17 Mar 2006 
OpenNTF Disclaimer

All of the program code and information presented in the OpenNTF.org Code Bin are provided "as-is", and should be used at your own risk. OpenNTF.org make no express or implied warranty about anything in the Code Bin, and OpenNTF.org will not be responsible or liable for any damage caused by the use or misuse of anything from this site. OpenNTF.org makes no guarantees about anything. Please thoroughly test all of the knowledge and code you find here before you attempt to use them in your production environment.

Code / Description
s1:=@Subset(@DbName ;1);

s:=@If(s1 = ""; "Local";s1);
f:=@Subset(@DbName ;-1);
t:=@DbTitle;
strMsg1:= "Server: " + s + @Char(10) + "File: " + f + @Char(10) + "Title: " + t;
strMsg:= s + " / " + f + " / " + t;
@Prompt([OkCancelEdit];"Info";strMsg1; strMsg )

Usage / Example
If I recently had a local replica open in design and also had the server version open in the recent database list, I find myself using the above code to be certain of which version I have open. The tool tips built into designer don't seem to work well for me ( after toggling between designer and client and having several different apps open the current open window doesn't show the full path and sometimes led to confusion).

The code above is added to "Smart Icon" / "Toolbar" to view the current database's Server / Title / and filename. Although this info is available in the Properties box, this version has 2 advantages:

1. long file names are clearly visible
2. you can copy any of the information in the prompt box to use in coding simple agents

I am not recommending hardcoding of these values into a design, but for use in any clean up agents that I often write for test purposes.
 Comments
Posted by Andrew Barker on 03/17/2006 01:08:18 PMAdd Replica ID
Nice...
Can also add replica id in v6 with:
r := @ReplicaID;
strMsg1:= "Server: " + s + @Char(10) + "File: " + f + @Char(10) + "Title: " + t + @Char(10) + "Replica ID: " + r;
strMsg:= s + " ~ " + f + " ~ " + t + " ~ " + r;
 Add your comment!