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

Posted on 2008-11-06
Last Modified: 2013-12-18
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
Question by:mnovosad
    LVL 46

    Accepted Solution

    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";

    The last line serves as the value of the field Field1, which should be unchanged, therefore I used @ThisValue
    LVL 63

    Expert Comment

    This could also be put in the exit field event.
    LVL 46

    Expert Comment

    by:Sjef Bosman
    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.

    Featured Post

    How your wiki can always stay up-to-date

    Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
    - Increase transparency
    - Onboard new hires faster
    - Access from mobile/offline

    Join & Write a Comment

    This is an old article, please see an updated version of this article, located here:
    Article by: Rob
    Notes 8.5 Archiving Steps and Tips This article covers setting up a Notes archive, and helps understand some of the menu choices making setting up and maintaining a Notes archive file easier.
    This video discusses moving either the default database or any database to a new volume.
    Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

    728 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    16 Experts available now in Live!

    Get 1:1 Help Now