Quick Search
Social Sites
Lotus Community


« Depressing or Impressive? | Main | PintWare button added »
Sunday
Dec192004

Field Editor Smart Icon

This is a really useful formula. Not one to let your users have access to but put it into an action button on an admin view and it will let you edit any field value on a document when used in a view icon or smart icon.
List := @DocFields; DataTypes := "Text" : "Text List" : "Date" : "Number";
EditField := @Prompt( [OKCANCELLIST] ; "Select a field to alter" ; "Select the field you wish to alter:" ; "CustomerReply" ; List ) ;

Edit := @Prompt( [YESNO] ; "Confirm" ; "Are you sure you want to alter the current contents of field \"" + EditField + "\"." );

RawValue := @If( Edit = 1 ; @Prompt( [OKCANCELEDIT] ;
"New Value" ; "Please enter the new desired value." ; NULL ) ;
@Return(NULL) );

DataType := @Prompt( [OKCANCELLIST] ; "Data Type" ; "Please Select the correct DataType" ; "Text" ; DataTypes );

@If( DataType = "Date" ; @SetField( EditField ; @TextToTime( RawValue )) ; DataType = "Number" ; @SetField( EditField ; @TextToNumber( RawValue )) ; DataType = "Text List"; @SetField(EditField; @Explode(RawValue; ",;:")); @SetField( EditField ; RawValue ) )

Reader Comments (1)

I started with something very similar to this but have made a handfull of improvements. Take a look:
http://chadsmiley.dominodeveloper.net/chadsmiley/home.nsf/plinks/CHAY-66Z8T6

December 28, 2004 | Unregistered CommenterChad

PostPost a New Comment

Enter your information below to add a new comment.

My response is on my own website »
Author Email (optional):
Author URL (optional):
Post:
 
Some HTML allowed: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <code> <em> <i> <strike> <strong>