You need to sign in to do that
Don't have an account?
Kris Weixel
Error: Incorrect parameter type for operator '>'. Expected Number, Date, DateTime, received Text
I have a formula field, "Age", that caluclates the ages of our clients. Age is set up as a text return type and has this formula:
IF(TODAY() >=Date(YEAR(TODAY()),
MONTH(Birthdate), DAY(Birthdate)),
TEXT(YEAR(TODAY()) - YEAR(Birthdate)),
TEXT(YEAR(TODAY()) - YEAR(Birthdate) - 1))
I want to create an "age range" field, so created another formula field with a return type of text, but keep getting the error: Error: Incorrect parameter type for operator '>'. Expected Text, received Number. Here is my formula:
IF(age__c>"18","19+",
IF(age__c>="15","15-18",
IF(age__c>="10","10-14",
IF(age__c>="6","6-9",
IF(age__c>="3","3-5",
IF(age__c<="2","None"))))))
I get an error too if I try to change my age field to a number and try it from that way.
Thanks for any help!
Kris
IF(TODAY() >=Date(YEAR(TODAY()),
MONTH(Birthdate), DAY(Birthdate)),
TEXT(YEAR(TODAY()) - YEAR(Birthdate)),
TEXT(YEAR(TODAY()) - YEAR(Birthdate) - 1))
I want to create an "age range" field, so created another formula field with a return type of text, but keep getting the error: Error: Incorrect parameter type for operator '>'. Expected Text, received Number. Here is my formula:
IF(age__c>"18","19+",
IF(age__c>="15","15-18",
IF(age__c>="10","10-14",
IF(age__c>="6","6-9",
IF(age__c>="3","3-5",
IF(age__c<="2","None"))))))
I get an error too if I try to change my age field to a number and try it from that way.
Thanks for any help!
Kris
I believe you need to update the formula to take the value of age as it is text field. You would also need to change the the text to the right of the '>' operator to be an integer rather than text. Does something like this work for you:
Thank you for your response! I tried what you have above, but see this error now: Error: Incorrect number of parameters for function 'IF()'. Expected 3, received 2... Not sure why...?
Thanks!
Kris
Can someone tell me what is being spelled incorrectly?
for example
this will check the age and return 'Senior' or 'Junior' as text. In your case, you just need to do something like