Forum Discussion

Tony2021's avatar
Tony2021
Iron Contributor
Aug 20, 2022
Solved

Using IIF and Date()

Experts,   I am using IIF to evaluate whether or not a date [InvDueDate] is between the criteria below.  It is not evaluating correctly in all cases since it returns "Payment is Pending" even when ...
  • George_Hepworth's avatar
    George_Hepworth
    Aug 21, 2022
    That tells you the result is the wrong datatype. The control is expecting one datatype, but the expression is returning a different datatype.

    And, with that, I see my mistake. You want to put either a valid date or a text string ("Payment is Pending") in that control. You can't put text into a date field. You'll have to present an alternative way to signal to the user that the payment is pending, a control that does accept text.

Resources