ChadSmiley Blog Things about family, life, coding, and more

16Aug/053

Set Template Version without browsing

Chris listened to my first suggestion to be able to launch the database from designer so templates would be able to be selected. I still did not like having to open Chis' *Set Template Version* database every time, nothing against your design Chris.

As I started working with this more I realized users of Quick Elementer had the same type of request. Which is to be able to access the application using the currently selected template instead of having to browse. The code below will all you to set the Template Version based on the currently selected template.

Here is another Tool that I have I have added to the Tools menu in Designer next to Quick Elementer and Quick Elementer Code.

server := "";
database := "TemplateVersion.nsf" ;
 
TemplateVersion := @DbTitle + "|" + @Implode( @DbName ; "!!" ) ;
 
@UpdateFormulaContext;
@StatusBar( "Set template version for " + @Left( TemplateVersion ; "|" ) );
@Command([FileOpenDatabase] ;server : database ; "" ; "" ; @True ; @True ) ;
@UpdateFormulaContext;
 
@Command([ViewRefreshFields]);
 
FIELD RecentFilesTX := @Unique( RecentFilesTX : TemplateVersion );
 
@Command([ViewRefreshFields]);
 
FIELD SelectFileTX := @RightBack( TemplateVersion ; "|" );
 
@UpdateFormulaContext;
@Command([RunAgent] ;"Set Template Version" )


Code formatted using Format Formula as HTML

Tagged as: 3 Comments