Hello,
I have a database which includes fields for months:
ONGOING.d.JAN
ONGOING.d.FEB
ONGOING.d.MAR
etc.
This dbf is a given.... so the months-as-fields format is my starting point.
If I use ...
<MvIF EXPR="{ server_current_month EQ 3 AND ONGOING.d.MAR EQ 1 }">
... I can check if the server_current_month (which is either the actual
current month as a number or a target month specified as a number elsewhere
in the script) equals 3 and, if so, if the d.MAR field is EQ to 1. If both
conditions are met, something is displayed.
Great... but what I want to do is determine this dynamically:
Check the server_current_month
If it is 1, see if ONGOING.d.JAN is EQ 1
but if it is 2, see if ONGOING.d.FEB is EQ 1
but if it is 3, see if ONGOING.d.MAR is EQ 1
etc.
If the appropriate server_current_month condition is met, display the thing.
Other than a whopping bunch of ELSEs, I am not sure how to do this..... and
12 successive </MvIFs> just make me sure there is a better conceptual approach.
All guidance welcome!
Thanks
rg
Ralph Gauer
[email protected]
www.ralphgauer.com
505-534-4184
Silver City, New Mexico
Comment