Self-maintaining date lookup field

This code calculates five years in the future for what ever year it is.

While making a combobox year field, I realized someone would have to come back to update the finite year (2006,2007,2008 etc.) sometime in the future.

This code calculates five years in the future for what ever year it is. So as each year passes the field will never have to be updated, the years keep going on.


Add this code to an editable Combobox field with formula lookup code:

REM "THIS CODE CALCULATES 5 YEAR INTO THE FUTURE FROM WHATEVER YEAR IT IS";
a := @Year(@Today);
b1 := @Year(@Adjust(@Today;1;0;0;0;0;0));
b2 := @Year(@Adjust(@Today;2;0;0;0;0;0));
b3 := @Year(@Adjust(@Today;3;0;0;0;0;0));
b4 := @Year(@Adjust(@Today;4;0;0;0;0;0));
b5 := @Year(@Adjust(@Today;5;0;0;0;0;0));
@Text(a:b1:b2:b3:b4:b5)

Dig Deeper on Domino Resources

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