Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

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

Posted on 2008-11-06
3
Medium Priority
?
1,850 Views
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
Thanks
0
Comment
Question by:mnovosad
  • 2
3 Comments
 
LVL 46

Accepted Solution

by:
Sjef Bosman earned 500 total points
ID: 22896338
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
 
LVL 63

Expert Comment

by:SysExpert
ID: 22896391
This could also be put in the exit field event.
0
 
LVL 46

Expert Comment

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

Featured Post

Vote for the Most Valuable Expert

It’s time to recognize experts that go above and beyond with helpful solutions and engagement on site. Choose from the top experts in the Hall of Fame or on the right rail of your favorite topic page. Look for the blue “Nominate” button on their profile to vote.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I thought it will be a good idea to make a post as it will help in case someone else faces these issues. I trust this gives an idea how each entry in Notes.ini can mean a lot for the Domino Server to be functioning properly. This article discusses t…
Problem "Can you help me recover my changes?  I double-clicked the attachment, made changes, and then hit Save before closing it.  But when I try to re-open it, my changes are missing!"    Solution This solution opens the Outlook Secure Temp Fold…
Integration Management Part 2
Despite its rising prevalence in the business world, "the cloud" is still misunderstood. Some companies still believe common misconceptions about lack of security in cloud solutions and many misuses of cloud storage options still occur every day. …

810 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