Dominoarea.org Index du Forum Dominoarea.org
 Forum, Téléchargement Lotus Domino/Notes en Français 
 FAQFAQ   PartenairesPartenaires   RechercherRechercher   Liste des MembresListe des Membres   Groupes d'utilisateursGroupes d'utilisateurs 
 S'enregistrerS'enregistrer   ConnexionConnexion 
La date/heure actuelle est 09 Sep 2010 à 11:58
Toutes les heures sont au format UTC + 1
Voir les nouveaux messages depuis votre dernière visite
Voir les messages sans réponses
 Index du Forum » IBM-Lotus Domino » Trucs et Astuces » Développement » Formula
bouton servant à certaines operations sur un document
Modérateurs: Modérateur
Poster un nouveau sujet   Répondre au sujet Voir le sujet précédentVoir le sujet suivant
Page 1 sur 1 [1 message]  
Auteur Message
billbock
Modérateur
Modérateur


Inscrit le: 15 Fév 2007
Messages: 280
Warnings: 0 0 Warnings
Spécialité: Non spécifié
Localisation: paris
Pays:
Sexe:
Age: 36
Navigateur:
 bouton servant à certaines operations sur un document

à mettre ds un bouton de tool bar

Ce code dans un bouton permet de remplacer les agents du type

refresh ou recuperation du UNID

cela per met de ne pas avoir d'agent "polluant la base"



Code:
ToolbarToolsLastSelection := "ToolbarToolsLastSelection";
ToolbarToolsLastProfile := "ToolbarToolsLastProfile";
ToolbarToolsLastEnvironmentVariable := "ToolbarToolsLastEnvironmentVariable";
ProfileName := "ChadSmiley Tools";
DefaultSelection := "Undo Replication Conflict";

REM {Get last selection for this database};
ToolbarToolsSelection := @GetProfileField( ProfileName ; ToolbarToolsLastSelection ; @UserName ) ;

Option := @Prompt( [OkCancelCombo] ; "Select Option" ; "What would you like to do:" ; @If( ToolbarToolsSelection = "" ; DefaultSelection ; ToolbarToolsSelection ) ; @Explode( "Undo Replication Conflict:Unlock Document:Refresh Selected Documents:Link Message:Workflow Formula Test:Agent Run:Agent Run Current:Get Notes ID:Get UNID:Get Parent UNID:Edit Profile Document:Get Environment Value:Set Environment Value"  ; ":" ) ) ;

REM {Set last selection for this database};
@SetProfileField( ProfileName ; ToolbarToolsLastSelection ; Option ; @UserName ) ;

@If( Option = "Refresh Selected Documents" ; @Command([ToolsRefreshSelectedDocs])  ; "") ;

@If( Option = "Undo Replication Conflict" ; @Do( @SetField("$REF" ; @DeleteField ) : @SetField( "$Conflict" ; @DeleteField ) ) ;

Option = "Unlock Document" ; @Do( @SetField("$Writers" ; @DeleteField ) : @SetField( "$WritersDate" ; @DeleteField ) ) ;

Option = "Agent Run" ; @Do ( @Command([RunAgent] ; @Prompt( [OkCancelEdit];"Run Agent" ; "Enter agent to run"; "" ) ) ) ;

Option = "Agent Run Current" ; @Do ( @Command([ToolsRunMacro]; $Title) ) ;

Option = "Link Message" ; @Do ( @Command([Compose]; @MailDbName; "Bookmark") ) ;

Option = "Edit Profile Document" ; @Do (
   @SetProfileField( ProfileName ; ToolbarToolsLastProfile ; @Prompt([OkCancelEdit]; "Open Profile Document"; "Profile Document Name (There should be a corresponding form or suborm)"; @GetProfileField( ProfileName ; ToolbarToolsLastProfile ; @UserName ) ) ; @UserName ) :
   @Command([EditProfile] ; @GetProfileField( ProfileName ; ToolbarToolsLastProfile ; @UserName ) ; @If( @Prompt( [YesNo] ; "Personal Profile" ; "Is this a personal profile?" ) ; @UserName ; "" ) ) ) ;

Option = "Get Environment Value" ; @Do (
   CurrentEnvVariable := @GetProfileField( ProfileName ; ToolbarToolsLastEnvironmentVariable ; @UserName ) ) :
   @Set( "NewEnvVariable" ; @Prompt([OkCancelEdit]; "Get Environment Value"; "Enter the name of the environment variable:"; CurrentEnvVariable ) ) :
   @SetProfileField( ProfileName ; ToolbarToolsLastEnvironmentVariable ; NewEnvVariable ; @UserName ) :
   @Prompt([OkCancelEdit]; "Environment Value"; "The value of the evironment variable '" + NewEnvVariable +  "':"  ;  @Environment( NewEnvVariable ) );

Option = "Set Environment Value" ; @Do (
   CurrentEnvVariable := @GetProfileField( ProfileName ; ToolbarToolsLastEnvironmentVariable ; @UserName ) ) :
   @Set( "NewEnvVariable" ; @Prompt([OkCancelEdit]; "Set Environment Value"; "Enter the name of the environment variable:"; CurrentEnvVariable ) ) :
@Prompt( [Ok]; "hi" ; NewEnvVariable ):
   @SetProfileField( ProfileName ; ToolbarToolsLastEnvironmentVariable ; NewEnvVariable ; @UserName ) :
   @SetEnvironment( NewEnvVariable ; @Prompt([OkCancelEdit]; "Environment Value"; "The new value of the evironment variable '" + NewEnvVariable +  "':"  ;  @Environment( NewEnvVariable ) ) );

Option = "Get Parent UNID" ; @Do ( @Prompt([OkCancelEdit]; "Parent UNID"; "Parent Unique ID"; @Text($REF)) ) ;

Option = "Get UNID" ; @Do ( @Prompt([OkCancelEdit]; "UNID"; "Unique ID"; @Text(@DocumentUniqueID)) ) ;

Option = "Get Notes ID" ; @Do ( @Prompt([OkCancelEdit]; "NoteID"; "NoteID"; @Text(@NoteID))  ) ;

Option = "Workflow Formula Test" ; @Do ( @Command([Compose]; @DbName; "(OS FormulaTest)") ) ;

"" )


MessagePosté le: 27 Sep 2007 à 11:52
 Voir le profil de l'utilisateur Envoyer un message privé Envoyer un e-mail MSN Messenger
 Revenir en haut de page 
Montrer les messages depuis:   Trier par:   
Page 1 sur 1 [1 message]  
Poster un nouveau sujet   Répondre au sujet Voir le sujet précédentVoir le sujet suivant
 Index du Forum » IBM-Lotus Domino » Trucs et Astuces » Développement » Formula
Sauter vers:  

Vous ne pouvez pas poster de nouveaux sujets dans ce forum
Vous ne pouvez pas répondre aux sujets dans ce forum
Vous ne pouvez pas éditer vos messages dans ce forum
Vous ne pouvez pas supprimer vos messages dans ce forum
Vous ne pouvez pas voter dans les sondages de ce forum
Vous ne pouvez pas joindre des fichiers dans ce forum
Vous pouvez télécharger des fichiers dans ce forum

phpBB SEO URLs V2

Flux RSS 
Powered by phpBB © 2001, 2005 phpBB Group
Traduction par : phpBB-fr.com
Version française de Categories Hierarchy © GGWeb-FR
[ Temps : 0.1400s ][ Requêtes : 13 (0.0059s) ][ GZIP actif - Débogage actif ]