Manage Learn to apply best practices and optimize your operations.

Set field value/type via smart icon

Here's how to set the field values and types via use of the Smart Icon.

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.

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)) )
This was last published in September 2001

Dig Deeper on Domino Resources - Part 5

Start the conversation

Send me notifications when other members comment.

By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Please create a username to comment.




  • iSeries tutorials's tutorials provide in-depth information on the iSeries. Our iSeries tutorials address areas you need to know about...

  • V6R1 upgrade planning checklist

    When upgrading to V6R1, make sure your software will be supported, your programs will function and the correct PTFs have been ...

  • Connecting multiple iSeries systems through DDM

    Working with databases over multiple iSeries systems can be simple when remotely connecting logical partitions with distributed ...