You need to sign in to do that
Don't have an account?
Patrick LaFonte
Contains compare against multiple text values
can someone help me understand why this doesnt work for multiple values?
<p>{!if(CONTAINS(relatedTo.Account.ShippingPostalCode,"17837:12221"),"EST","not found")}
</p>
If I compare for just one value i get expected result.
EX:
<p>{!if(CONTAINS(relatedTo.Account.ShippingPostalCode,"17837"),"EST","not found")}
</p>
Working on a visualforce email template and need a way to compare a significant amount of zipcodes and return time zone.
Thanks
<p>{!if(CONTAINS(relatedTo.Account.ShippingPostalCode,"17837:12221"),"EST","not found")}
</p>
If I compare for just one value i get expected result.
EX:
<p>{!if(CONTAINS(relatedTo.Account.ShippingPostalCode,"17837"),"EST","not found")}
</p>
Working on a visualforce email template and need a way to compare a significant amount of zipcodes and return time zone.
Thanks
I tried to recreate the same in my dev Org but it's working as the way you expected.Can you compare the below merge expression with your version.
<messaging:emailTemplate subject="Test" recipientType="User" relatedToType="Account">
<messaging:plainTextEmailBody >
Congratulations!
This is your new Visualforce Email Template.
<p>{!if(CONTAINS(relatedTo.ShippingPostalCode,"17837:12221"),"EST","not found")}</p>
</messaging:plainTextEmailBody>
</messaging:emailTemplate>
Kindly Mark this as a Best Answer if you Find this Useful!
Thanks
DineshKumar Gopalakrishnan
{!if(CONTAINS(relatedTo.Account.ShippingPostalCode,"17837:12221"),"EST","not found")}
Account.ShippingPostalCode = 17837 Result = not found (should be EST) Vs{!if(CONTAINS(relatedTo.Account.ShippingPostalCode,"17837"),"EST","not found")}
Account.ShippingPostalCode = 17837 Result = EST as expected Let me know if any insights as I have spent hours trying to figure this out. Thanks, Patrick Sensitivity: Internal