« Teamstudio Script Browser 1.05 | Main| Toolbar Functions 1.3.0 »

Toolbar Functions 1.2.0

Bookmark : del.icio.us  Technorati  Digg This  Add To Furl  Add To YahooMyWeb  Add To Reddit  Add To NewsVine 

There are a couple of new functions and a screencast explaining all of the functions.  The new functions are indicated below.  There is also history for Get and Set Environment Variables, Agent Run, Edit Profile Document, and Formula Evaluate.  The history  was built on some new features in Edit Document Fields.  

Here are the current options:
  • Agent Run
  • Agent Run Current
  • Database Path
  • Database Replica ID
  • Database Server
  • Database Server & Path
  • Edit Profile Document
  • Formula Evaluate
  • Get Environment Value
  • Link Message
  • Note ID
  • Parent UNID
  • Refresh Selected Documents
  • Set Environment Value
  • Undo Replication Conflict
  • Unlock Document
  • UNID
  • Workflow Formula Test


Toolbar Functions 1.2.0 Code

Select All


Comments

1 - And here is an improved version, that handles non-standard ports and SSL:
host:=@DbLookup("":""; @Subset(@DbName; 1) : "names.nsf"; "($Servers)"; @Subset(@DbName; 1); "SMTPFullHostDomain");
normalMode:=@DbLookup("":""; @Subset(@DbName; 1) : "names.nsf"; "($Servers)"; @Subset(@DbName; 1); "HTTP_NormalMode");
sslMode:=@DbLookup("":""; @Subset(@DbName; 1) : "names.nsf"; "($Servers)"; @Subset(@DbName; 1); "HTTP_SSLMode");
port:=@DbLookup("":""; @Subset(@DbName; 1) : "names.nsf"; "($Servers)"; @Subset(@DbName; 1); "HTTP_Port");
sslPort:=@DbLookup("":""; @Subset(@DbName; 1) : "names.nsf"; "($Servers)"; @Subset(@DbName; 1); "HTTP_SSLPort");

prefix:=@If(
normalMode = "1" | normalMode = "2"; "http";
"https"
);

portSuffix:=@If(
prefix = "http" & port = 80; "";
prefix = "https" & sslPort = "443"; "";
prefix = "http"; ":" + @Text(port);
prefix = "https"; ":" + @Text(sslPort);
""
);

@URLOpen(prefix + "://" + host + portSuffix + "/" + @WebDbName + "/0/" + @Text(@DocumentUniqueID) + "?OpenDocument")

2 - I love easy requests, done.

3 - Tip: put the version number in your first REM statements in the code, so I know what version I have

4 - Thanks Johan. This is great.

5 - Here is another request! A button to open the current document in a web browser. Here is a working contribution:
lookup:=@DbLookup("":""; @SubSet(@DbName; 1) : "names.nsf"; "($Servers)"; @SubSet(@DbName; 1); "SMTPFullHostDomain");
@If(
@IsError(lookup); @Prompt([OK]; "Invalid host name"; "Could not get host name from server document");
@URLOpen("{ Link } + lookup + "/" + @WebDbName + "/0/" + @Text(@DocumentUniqueID) + "?OpenDocument")
)

Post A Comment

:-D:-o:-p:-x:-(:-):-\:angry::cool::cry::emb::grin::huh::laugh::lips::rolleyes:;-)