Invalid Argument

Meeting place for R&R customers and clients to share tips and ideas. Post your questions, messages or problems here.
Post Reply
AngeldelaNoche
Posts: 12
Joined: Tue Oct 10, 2017 12:44 pm

Invalid Argument

Post by AngeldelaNoche » Fri Jul 11, 2008 9:25 am

__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.____

kfleming
Posts: 5795
Joined: Tue Oct 10, 2017 12:44 pm

=> RE: Invalid Argument

Post by kfleming » Mon Jul 14, 2008 9:30 am

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

Post Reply