I'm creating a custom field in my Case object, whose value is set based on a formula which compares 2 values in an IF statement. My problem however, is the comparison between these 2 doesn't seem to be working.
Here are my 2 values I'm comparing:
- Case.RecordTypeId = 01230000000mn4qAAA
- $Label.MyCompVal = 01230000000mn4qAAA
When I use the following formula however, my IF statement is incorrectly saying they're NOT identical, and thus assigning the value 'B':
if(RecordTypeId == $Label.MyCompVal, 'A', 'B')
My assumption is the Case.RecordTypeId field is somehow grabbing & comparing only the 1st 15 characters (18 chars total) against the full 18 characters of $Label.MyCompVal. The reason I say this is because I decided to change the output value of 'B', to show the value of both of these:
if(RecordTypeId == $Label.MyCompVal, 'A', RecordTypeId + ':' + $Label.MyCompVal)
My result is 01230000000mn4q:01230000000mn4qAAA
As you can see, RecordTypeId only contains the first 15 characters of its total 18, which is why I feel the comparison is failing.
Any idea why this is happening?