It just hit me how often a user reports a problem about a specific document. I track it down with a full-text, then I want to open it in a browser (to see what the user sees). So … I created this little formula which can be put into a SmartIcon and used in any database on any server. Quick and easy.Note 1: Substitute your domain below.
Note 2: You may or may not like the @Prompt near the bottom. Feel free to remove it.
Enjoy!
@If( @IsNewDoc;
@Return( @Prompt( [OK]; “Error: New Document”; “You cannot get a valid UNID from a document until after it has been saved.” ));
@Success);
Hdr := “http://”;
Srv := @ReplaceSubstring(@Name([CN]; @Subset(@DbName; 1));“\”;“/”);
Domain := “.mydomain.com”;
DB := “/” + @ReplaceSubstring(@Subset(@DbName;-1);“\”;“/”);
Vw := “/0/”;
UNID := @Text(@DocumentUniqueID);
Act := “?Open”;
Path:= @Trim( Hdr + Srv + Domain + DB + Vw + UNID + Act );
@Prompt( [OkCancelEdit]; “URL to current document”; “OPTIONAL: Copy the text below to your clipboard.”; Path );
@URLOpen( Path )