Code for "smart" edit button to test that a document is selected (rather than a category): 
@If(Form=""; @Prompt([Ok]; "Oops"; "Select a document, not a category."); 
@Command([EditDocument])) 
  
 
Code to verify that correct document (form) is selected before creating a new doc: 
@If(Form="Policy"; @Command([Compose]; "Q"); 
Form=""; @Prompt([Ok]; "Sorry"; "Select a Policy document, not a category."); 
@Prompt([Ok]; "Sorry"; "You can create a Question only from a Policy"))
  
previous page
 
  |