You need to sign in to do that
Don't have an account?
Sami Shakith
Compare a integer with picklist value in formula field.
Hi all,
I want to compare a integer value with picklist field. while doing im getting "Error: Incorrect parameter type for function 'ISPICKVAL()'. Expected Text Literal, received Number" like this. Please need expert help
I want to compare a integer value with picklist field. while doing im getting "Error: Incorrect parameter type for function 'ISPICKVAL()'. Expected Text Literal, received Number" like this. Please need expert help
IF(VALUE(TEXT(Date__c)) == DAY(TODAY()) , TRUE,FALSE)
All Answers
Make sure you wrap the number within single quotes like this:
ISPICKVAL( Object__c.Field__c , '1')
Let me know if you found this helpful!
Miika
IF(ISPICKVAL(test__c, '1'),'1','2')
Thank you so much. It works.
IF(VALUE(TEXT(test__c)) == 1,'1','2')
here test__c is picklist field.
My formula field is like that
IF( ISPICKVAL(Date__c, ' DAY( TODAY() )'), 'true', 'false')
Every time its update false value only. I gave 8 in Date__c field it returns false value but that day(today()) returns 8 in another formula field. Is anything wrong in my formula?
IF(VALUE(TEXT(Date__c)) == DAY(TODAY()) , TRUE,FALSE)
According to official docs here
https://developer.salesforce.com/docs/atlas.en-us.pages.meta/pages/pages_variables_functions.htm
"ISPICKVAL(picklist_field, text_literal)and replace picklist_field with the merge field name for the picklist; replace text_literal with the picklist value in quotes. text_literal cannot be a merge field or the result of a function."
So it can not be a result of other function.
If it solved your problem, please mark it as SOLVED so that it can help others.