barbotte
asked on
Switch/case instead of If
This question is based on Q_21139033
Let's say I have 6 different "date/time" fields.
Some of them could be left blank.
In a view, I'd like a specific column to show the earliest date among the 6 fields...
So, is there a way to do a Switch/case thing in Lotus Notes?? Or should I make a big IF statement?
Let's say I have 6 different "date/time" fields.
Some of them could be left blank.
In a view, I'd like a specific column to show the earliest date among the 6 fields...
So, is there a way to do a Switch/case thing in Lotus Notes?? Or should I make a big IF statement?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
But don't EVER do this in a view column, for it will make the view unnecessarily slow. It's better to add a field that does this computation when the document is saved.
ASKER
sjef_bosman , What does the first line mean?
Cos the dates in the 6 fields could be in 2008 or so!
Cos the dates in the 6 fields could be in 2008 or so!
ASKER
and... What should I do if the database already have records in it?
Use @Sort if you are using R6
eg:
list := @trim(f1:f2:f3:f4:f5:f6);
Sort(list; [Descending])
~Hemanth
eg:
list := @trim(f1:f2:f3:f4:f5:f6);
Sort(list; [Descending])
~Hemanth
ASKER
Ok, sjef_bosman solution works fine, thank you!
You CAN get OK performance out of the @Today by using an odl textttime of "Today" trick.
The first line creates a vraiable with a date 100 years from now, assuming you're not going over it. Astronomers do...