Hello,
I am using Forms Professional Version 10.4.0.1256
I am trying to create a flag by assigning a value of "TRUE" or "FALSE" to a single-line field based on a calculation. Let's call this single line field "FLAG". FLAG does not have a default value set.
The calculation should take the number(not a string) of the current month (today's current month is May so May's number would be 5) and evaluate it against a set number (lets say 2). So if the current month's number is less than 2, then return true.
CURRENT_MONTH is calculated by using the calculation: =MONTH(TODAY())
The calculation that I am trying to use is Less Than or LT and would be written as:
FLAG =LT(CURRENT_MONTH, 2)
Replacing the CURRENT_MONTH variable with its value of 5, this would translate to:
FLAG =LT(5,2)
and should return "FALSE".
The issue that I am having is that the calculation above is returning "TRUE".
I have fiddled with this by switching the parameter order to:
- =LT(2, CURRENT_MONTH)" (returns "TRUE" as it SHOULD since 2 is indeed less than 5)
- =LT(6, CURRENT_MONTH)" (returns "TRUE" as it SHOULD NOT since 6 is NOT less than 5)
- =LT(CURRENT_MONTH, 6)" (returns "TRUE" as it SHOULD since 5 is indeed less than 6)
So the FLAG variable seems to be hard set to "TRUE" so I tried assigning it a default value of "FALSE" but this did not work as FLAG kept getting updated to "TRUE".
Could it be that CURRENT_MONTH is receiving a "5" as a string and not a numeric literal and might be causing some comparison error against the numeric literal 2?
Thank you all for your time.