Home > Domino Tips > Administrator > Smart Icons > Set field value/type via smart icon
Domino Tips:
EMAIL THIS
 TIPS & NEWSLETTERS TOPICS 

SMART ICONS

Set field value/type via smart icon


Janet Rogers
09.04.2001
Rating: -4.29- (out of 5) Hall of fame tip of the month winner


Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us   


It can be frustrating to try to test a new document, then realize that a status field is set incorrectly. Or you may want to re-use a document that has a key field set to a different data type. This smart icon allows you to set both field value and/or data type on the fly. It covers all data types and allows changes to single or multiple value fields.



Code

REM "SmartIcon formula for arbitrary alteration of a field";

theField := @Prompt([OKCANCELLIST]; "Change Field"; "Select Field"; ""; "":@DocFields);

theValue := @Prompt([OKCANCELEDIT]; "Change Field"; "New Value: use 
semicolon separator for lists."; ""); theType := @Prompt([OKCANCELLIST]; "Change Field"; "Data
Type"; "Text"; "Text" : "Time" : "Number" : "Text List" : "Number
List" : "Time List"); @If( theType = "Time"; @SetField(theField; @TextToTime(theValue)); theType = "Number"; @SetField(thefield; @TextToNumber(theValue)); theType = "Text List"; @SetField(theField; @Trim(@Explode(theValue;";"))); theType = "Number List"; @SetField(theField; @TextToNumber(@Explode(@Trim(@ReplaceSubstring(theValue;" ";""));";"))); theType = "Time List"; @SetField(theField; @TextToTime(@Explode(theValue;";"))); @SetField(theField; @Text(theValue)) )

Rate this Tip
To rate tips, you must be a member of SearchDomino.com.
Register now to start rating these tips. Log in if you are already a member.




Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us   



RELATED CONTENT
Smart Icons
Smart icon to set field value/type, version 2
Easy way to count members of a group
SmartIcon code to display any open database's ReplicaID
SmartIcon shortcut to server
Special action ... SmartIcon @Formula for day-to-day tasks
Quick admin function in Notes client
Get the size of a user's mail database while in the Domino Directory
Quick import-export smart icons
SmartIcon to open a mailfile from NAB
Add mail file icon from NAB

RELATED RESOURCES
2020software.com, trial software downloads for accounting software, ERP software, CRM software and business software systems
Search Bitpipe.com for the latest white papers and business webcasts
Whatis.com, the online computer dictionary

DISCLAIMER: Our Tips Exchange is a forum for you to share technical advice and expertise with your peers and to learn from other enterprise IT professionals. TechTarget provides the infrastructure to facilitate this sharing of information. However, we cannot guarantee the accuracy or validity of the material submitted. You agree that your use of the Ask The Expert services and your reliance on any questions, answers, information or other materials received through this Web site is at your own risk.



Domino & Lotus Notes Security Solutions: Authentication, Antispam, Encryption and Antivirus
HomeTopicsITKnowledge ExchangeTipsAsk the ExpertsMultimediaWhite PapersDomino IT Downloads
About Us  |  Contact Us  |  For Advertisers  |  For Business Partners  |  Site Index  |  RSS
SEARCH 
TechTarget provides technology professionals with the information they need to perform their jobs - from developing strategy, to making cost-effective purchase decisions and managing their organizations' technology projects - with its network of technology-specific websites, events and online magazines.

TechTarget Corporate Web Site  |  Media Kits  |  Site Map




All Rights Reserved, Copyright 1999 - 2009, TechTarget | Read our Privacy Policy
  TechTarget - The IT Media ROI Experts