Invalid Argument
-
- Posts: 12
- Joined: Tue Oct 10, 2017 12:44 pm
Invalid Argument
__I am trying to create a calculated field:____IIF(OETHTERM = "T1", ADDDAYS(OETHIDATE,30), IIF(OETHTERM = "T2", ADDDAYS(OETHIDATE,10), IIF(OETHTERM = "T3", ADDDAYS(OETHIDATE,60), IIF(OETHTERM = "T4", ADDDAYS(OETHIDATE,90), ""))))____When I go to save it, it tells me "Invalid Argument". I hope I am just missing something real simple here.____
=> RE: Invalid Argument
In an IIF both the true and the false return values need to be of the same data type.____The true return value of each of your IIF^s is a date since ADDDAYS returns a date.__So your final default value of an empty string needs to be changed to a date field such as {01/01/2008} or date().__Or you could leave the empty string and surround all of the ADDDAYS with the DTOC function.____Kathleen__R&R Support