< Back

Document Subject: Lazy way to get database path and replication id and links
Hint Short Cut: Add this to your code & documentation to help you find this page.
http://#Lazy or http://A555F9/nn.nsf/ByAlias/Lazy

Quick way to copy the replica id and file path and server of a database. Updated.




When you need to grab the replica id or file path of a database, just do a File-> Database -> Design Synopsis,

Tick replication and database, press OK and then you have the details in a copyable format.

Easy and more accurate than writing it down on a post it note...

 

Better way: create a smart button:

Do  File->Preferences-Toolbar Preferences   (Notes 6.5 and 7)

Click on Customize and make sure Universal is selected.

Click New->Button

Pick a nice icon, I use the lightbulb.

Add this code:

@Command([EditMakeDocLink]);
r:=@DbName;
s:=@DbTitle;
repid:=@ReplicaID;
w:="http://"+@Name([CN];@Subset(r;1))+"/"+@ReplaceSubstring(@Subset(r;-1);"\\";"/");
@Command([Compose];@MailDbName;"Memo");
@Command([EditGotoField];"Subject");
@Command([EditInsertText];s);
@Command([EditGotoField];"Body");
@Command([EditInsertText];"Server:  "+@Implode(@Name([Abbreviate];r);"     Path:  "));
@Command([EditInsertText]; @Char(13) + @Char(10)  );
@Command([EditInsertText];"Web:  "+w);
@Command([EditInsertText]; @Char(13) + @Char(10)  );
@Command([EditInsertText];"Replica ID:  "+repid);
@Command([EditInsertText]; @Char(13) + @Char(10) );
@Command([EditInsertText];"Link:  ");
@Command([EditPaste]);
@Command([EditInsertText]; @Char(13) + @Char(10)  );
@Command([EditInsertText]; @Char(13) + @Char(10)  )

 

There might be a way of looking up the actual HTTP_HostName of the server and using that instead of the crude but usually effective @name([CN];servername), but I've run out of time...