Good afternoon,
I am attempting to write an expression through the formula tool and continue to get an error message that reads "wrong number of parameters for the function Null". I have written these types of expressions in the past and have never run into this issue. I am guessing that it is a relatively easy fix which I am unable to determine what to change. Any help would be greatly appreciated.
Thanks!
Solved! Go to Solution.
Hi @MHS ,
Are you trying to input a null value as the last clause? if so, drop the "0" from in the parentheses. Just null().
M.
Hi @mceleavey,
I attempted that earlier and get a different error message of "Invalid type in operator >=". I have tried to change up the greater than or equal to portion, but cannot get rid of the error message?
@MHS , this is due to the data type. What is the data type of the field?
Hi @MHS
When referencing a date field, you need to put quotes around the date in your formula.
IF [Field1]>= '2020-03-19' THEN '2020.07' ELSE Null() ENDIF
Thanks!
Phil
@MHS , you are comparing dates in a string field. Wrap the dates in a todate() function:
if [created] >=todate(2020-01-01) then "2020.01" etc.
M.
Hi @Maskell_Rascal and @mceleavey,
Thanks for all the help with this, the quotations addressed the error and the workflow ran successfully!
Matt