+ Start a Discussion
fgwarbfgwarb 

"Function INCLUDES may not be used in this type of formula"

Can someone demonstrate successful usage of the VF INCLUDES function?

 

None of the permutations I've used work!

 

{!INCLUDES(a.Targeted_By_Campaigns__c, 'ABC')}

{!IF(INCLUDES(a.Targeted_By_Campaigns__c, 'ABC'), 'TRUE','FALSE')}

 

Help!!?

Best Answer chosen by Admin (Salesforce Developers) 
Alderete_SFDCAlderete_SFDC

Thanks for the catch! You can consider this a confirmation that the docs will be reviewed and corrected on this topic.

 

The forums work OK for reporting doc (and other) bugs, but the ideal way to report a documentation bug is to log a case with Support.

 

The easiest way to do THAT is to use the links at the bottom of most doc pages in the online help (but not this one, unfortunately), where it asks if the topic answered your question or not. Click no, add a few details, and that report comes straight to the Doc Team for review and triage.

 

HTH, and thanks for the report!

All Answers

aballardaballard

The includes() function is not supported by visualforce.

fgwarbfgwarb

Then how can we get the documentation to be corrected?

 

www.salesforce.com/us/developer/docs/pages/Content/pages_variables_functions.htm

Alderete_SFDCAlderete_SFDC

Thanks for the catch! You can consider this a confirmation that the docs will be reviewed and corrected on this topic.

 

The forums work OK for reporting doc (and other) bugs, but the ideal way to report a documentation bug is to log a case with Support.

 

The easiest way to do THAT is to use the links at the bottom of most doc pages in the online help (but not this one, unfortunately), where it asks if the topic answered your question or not. Click no, add a few details, and that report comes straight to the Doc Team for review and triage.

 

HTH, and thanks for the report!

This was selected as the best answer
davcondevdavcondev

Obvious next question is...how to perform the equivalent of an INCLUDES in visualforce

etoeto
In most cases you just can use "CONTAINS" as the picklist is simply a semicolon (comma?) separated string.

Only if one of your picklist contains another picklist value, this might cause a problem if your looking for the shorter value. E.g. a picklist with "one,two,three" will always work, but a list with "one,one apple,two apples" could cause trouble if you're searching for "one" only. In that case you have to deal with it in your controller.

hth Ingo