Manage Learn to apply best practices and optimize your operations.

Pre-populating fields with users previous entries

This tip describes a method for pre-populating fields with users previous entries.

I built a Travel Requests database for the company I work for. In doing the research and analysis I discovered that most people do the same return flights at varying intervals, i.e. from Office A to Office B then Office B back to Office A.

To make life easier for the users I set the Travel form to self populate the From to To fields based on the details of their last flight.


You can use this method for any application where people are repeating previous requests. Here's how to do it.

  1. Create a hidden view called "(UserLookups)" that lists all their transactions in ascending date order, i.e latest last.
  2. The first column is categorised using the full hierarchical name of the user.
  3. The next column (unsorted)shows the manager who approves their requests (column 3)
  4. The next column (unsorted) shows where the first flight left from - their home town (column 4)
  5. The next column (unsorted) shows where they flew to - the destination (column 5)

Note: Unsorted columns are in ascending creation date order

The Fields on the form:

HOME field
field type = Dialog List - 
editable (uses a view lookup to 
select where the
flight will leave from)

Default Value
Home:=@Subset(@DbLookup( "" :
 "" ; "" : "" ; "(UserLookUps)" ; 
@UserName ;
4);-1);
@If(@IsError(Home);"<Select 
from List>";Home)

DESTINATION field
field type = Dialog List - editable 
(uses a view lookup to select where the
flight will leave from)

Default Value
Destination:=@Subset(@DbLookup
( "" : "" ; "" : "" ; "(UserLookUps)" ;
@UserName ; 5);-1);
@If(@IsError(Destination);"

Dig Deeper on Lotus Notes Domino Formula Language

Start the conversation

Send me notifications when other members comment.

Please create a username to comment.

-ADS BY GOOGLE

SearchWindowsServer

Search400

  • iSeries tutorials

    Search400.com'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 ...

SearchDataCenter

SearchContentManagement

Close