Domino Code Fragment

Code Name*
Changing Field Values From a Button
Date*
04/28/2024
Source (or email address if you prefer)*
Rlatulippe@romac.com
IP address:.3.17.154.171
Description*
When trying to change field values through the use of a button, while in read mode, follow this tip. If you set fields in read mode, they actually are set in the field. Therefore, all you have to do is set some dummy temp fields in read mode, and compute the translation formulas for the fields you want to set to look for their twin temp field and get the contents if available.
Type*
Formula
Categories*
(Misc)
Implementation:
Required Client:
Server:
Limitations:
Comments:
Files/Graphics attachments (if applicable): Code:
A := @Prompt([OKCANCELEDIT]; "Field Update"; "Enter the data for the Subject Field:";Subject);
FIELD TempSubject := A;
@Command([EditDocument]);
@Command([FileSave]);
@Command([EditDocument])


Now all that is left to do, is compute the Translation formula of the Subject field to look for contents in the TempSubject field and compute to that value if it is available, else compute to Subject.

When the doc is opened, saved, and closed the Subject field will be updated.

Also, in the validation formula, make your temp variable unavailable, or else you could potentially accumulate a lot of trash.