How can I auto populate a field within a Lotus notes form based of the results of another field?

Lotus Notes 6.5
How can I get a notes field to auto populate another notes field based off the selection from the first field?
user fills out the form, I'd like to have it pre-fill a couple of fields based off a selection in field 1.
User selects NO it then auto fills fields 2&3 with N/A

Field 1                              Field 2       Field 3
No                                                                    N/A                N/A
                              
If the users selects No  
then it pre-fills Field 2 and 3
with N/A. If the user selects Yes
then it does nothing.

Field 1 is a dialog list/editable            Field 2 is text            Field 3 is text      
It pulls values from a profile            editable. no profile      editable. no profile
document                        document            document

All fields are required fields based off this formula-
@If(@IsDocBeingSaved & Months = "" ;@Return("Please fill out the field.  Thank you.") ;@Success)

I'm new to this so picking up from other dB's as I go
Thanks
mnovosadAsked:
Who is Participating?
 
Sjef BosmanConnect With a Mentor Groupware ConsultantCommented:
Some questions to you in return:
- are Field2 and Field3 editable? apparently YES
- if yes, are they to be overwritten when a different value is selected in Field1?

If yes again, you could put your formulas in the Input Translation event of Field1, and enable Refresh fields on keyword change on Field1. The Input Translation formula is then executed when a different value is selected.

Suggested code in that event:

Field Field2:= "somevalue";
Field Field3:= "someothervalue";
@ThisValue

The last line serves as the value of the field Field1, which should be unchanged, therefore I used @ThisValue
0
 
SysExpertCommented:
This could also be put in the exit field event.
0
 
Sjef BosmanGroupware ConsultantCommented:
Did you know that the Exiting event is NOT executed if you only click a field, and then escape out of the document??

I wouldn't use the field's Exiting event. But if I had to pick any other one, I'd use one of the form's QueryRecalc or PostRecalc events.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.