Bug in Equal functoid - comparing strings with "E-"
4/8/2013 4:44:38 AM
User(s) can reproduce this bug
An application which was running well in production started to fail after few months, while anayzing the problem, it seems to be issue with the logical equal to fuctoid, this is very basic thing, I dont know how much it is going to impact in whole application. It is comparing two strings say "05070E-599" and "05453E-599" and returning true, while digging into the fuctoid code, it treats this as number (E- is treated as scientific notation) and some how it returns true, this makes the application fails in all levels because this is primary field to compare and select 1 out of 10 records which matches the value. Now i have changed Biztalk functoid with normal c# scripting fuctoid to comapre values. But it is a tedious job to make this change in all the Biztalk maps that compares above strings, any suggestion would be appreciated. is BizTalk Unable to understand atleast it is comparing two strings and not 2 numbers based on schema definition? Even if it is comparing two numbers, How these values could be equal ? I am using BizTalk 2010
BizTalk 2010 Beta
compare these two strings "05070E-599" and "05453E-599" using below functions used by BizTalk equal functoid, use in Biztalk map which will return true when compared using logical equal functoid
public bool LogicalEq(string val1, string val2)
bool ret = false;
double d1 = 0;
double d2 = 0;
if (IsNumeric(val1, ref d1) && IsNumeric(val2, ref d2))
ret = d1 == d2;
ret = String.Compare(val1, val2, StringComparison.Ordinal) == 0;
public bool IsNumeric(string val, ref double d)
if (val == null)
return Double.TryParse(val, System.Globalization.NumberStyles.AllowThousands | System.Globalization.NumberStyles.Float, System.Globalization.CultureInfo.InvariantCulture, out d);
to post a comment.
Please enter a comment.
to post a workaround.
Please enter a workaround.
on 4/15/2013 at 8:03 AM
You could always compare using a Scripting functoid with either XSLT, VB.NET or C#. It's not hard at all.
I do agree though -- a bug is a bug is a bug. It should be fixed.
© 2014 Microsoft