ChadSmiley Blog
Things about family, life, coding, and more
Links
Domino Tools
:
BlogSphere
:
Domiclipse
:
LotusScript.doc
LS as HTML
ScriptBrowser
Set Template Version
Smiley Tools
Copy Docs to DB
Document Locking Class
Domino Extended
Edit Document Fields
Format Formula as HTML
One Teamstudio Icon
Open Audit
Quick Elementer
Reference Lookup
Refresh Word Fields
Sites I Read
Toolbar Functions
Latest Downloads
Reference Lookup Library 1.2.0
Set Template Version
Design Information
Reference Lookup Library 1.1.0
Rational Rose Add-in for Lotus Domino Download
Format Formula 2 HTML Download
Reference Lookup 1.0.0
Twitter
follow me on Twitter
Search
Albums
Auto
Family
Fun
Home
Ads by Google
Category
BlogSphere
Cycling
Domino
Family
General
Home School
Microsoft
News
PDA
Proverb
Rational Rose
SnT Thursday
Teamstudio
MiscLinks
Archive
April 2008
March 2008
February 2008
January 2008
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
Full Archive
Googles
reference
download open audit
popsicle stick house
reference
reference
reference
reference
reference
reference
word macro refresh fields
02/28/2006
Edit Document Fields 2.1.0 Code
Bookmark :
Edit Document Fields 2.1.0 Code
Select All
REM {Edit Document Fields 2.1.0 by Chad Schelfhout.}; REM {Visit http://www.chadsmiley.com/EditDocumentFields for the latest updates}; REM "Get a listing of all the fields on the current document"; List := @DocFields; REM "Possible data types to choose from."; REM "I called Number Integer because use keyboard to select what you want with keyboard quicker."; DataTypes := "Text" : "Date" : "Integer" : "Password" : "Name" : "Common Name" : "Remove Field" : "Text Multi Value" : "Date Multi Value" : "Integer Multi Value" : "Name Multi Value" : "Common Name Multi Value" : "Upper Case Text" : "Lower Case Text" : "Proper Case Text" ; REM "Prompt for which field needs to be updated."; EditField := @Prompt( [OKCANCELLIST] ; "Select a field to alter from " + @DbTitle + " - " + @ViewTitle ; "Select the field you wish to alter:" ; "Subject" ; List ) ; REM "Prompt for which data type you would like the data to be"; REM "This needs to be done before value prompt to determine if the Picklist or any prompting needs to be used."; DataType := @Prompt( [OKCANCELLIST] : [NoSort] ; "Data type or action for field: " + EditField ; "Please select the correct data type or action for field: " + EditField + " from " + @DbTitle + " - " + @ViewTitle; "Text" ; DataTypes ); REM "Based on what type of data is being entered different prompts will happen if any at all."; RawValue := @If( @Contains( DataType ; "Name Multi Value" ); @PickList( [Name] ); @Contains( DataType ; "Name" ) ; @PickList( [Name] : [Single] ); DataType = "Remove Field" ; "" ; @Contains( DataType ; "Multi Value" ); @Prompt( [OKCANCELEDIT] ; "New Value for field: " + EditField ; "Please enter the new desired value for: " + EditField + " from " + @DbTitle + " - " + @ViewTitle + ". Seperated with : for each value." ; @Abstract([TextOnly] ; 254 ; "" ; @Text( EditField ) ) ); @Prompt( [OKCANCELEDIT] ; "New Value for field: " + EditField ; "Please enter the new desired value for: " + EditField + " from " + @DbTitle + " - " + @ViewTitle + "." ; @Abstract([TextOnly] ; 254 ; "" ; @Text( EditField) ) ) ); REM "If data conversion doesn\'t work then don\'t set field."; @If( DataType = "Date" ; @If( @SetField( EditField ; @TextToTime( RawValue ) ) ); DataType = "Integer" ; @If( @IsError( @TextToNumber( RawValue ) ) ; "" ; @SetField( EditField ; @TextToNumber( RawValue ) ) ) ; DataType = "Common Name" ; @SetField( EditField ; @Name( [CN]; RawValue ) ) ; DataType = "Password" ; @SetField( EditField ; @Password( RawValue ) ) ; DataType = "Remove Field" ; @SetField( EditField ; @DeleteField ) ; DataType = "Text Multi Value" ; @SetField( EditField ; @Explode( RawValue ; ":" ) ) ; DataType = "Date Multi Value" ; @SetField( EditField ; @TextToTime( @Explode( RawValue ; ":" ) ) ) ; DataType = "Integer Multi Value" ; @If( @IsError( @TextToNumber( @Explode( RawValue ; ":" ) ) ) ; "" ; @SetField( EditField ; @TextToNumber( @Explode( RawValue ; ":" ) ) ) ) ; DataType = "Name Multi Value" ; @SetField( EditField ; @Explode( RawValue ; ":" ) ) ; DataType = "Common Name Multi Value" ; @SetField( EditField ; @Name( [CN]; @Explode( RawValue ; ":" ) ) ); DataType = "Upper Case Text" ; @If( @SetField( EditField ; @UpperCase( RawValue ) ) ); DataType = "Lower Case Text" ; @If( @SetField( EditField ; @LowerCase( RawValue ) ) ); DataType = "Proper Case Text" ; @If( @SetField( EditField ; @ProperCase( RawValue ) ) ); @SetField( EditField ; RawValue ) ); ""
Permalink
|
Comments (0)
|
TrackBacks (0)
| Category