none
Error while Test Map in Biztalk 2010 RRS feed

  • Question

  • Hello,

    I have made some changes to the existing map and tried to test the map.The Changes I made is adding a scripting functoid with the following code

    public string Code(string recode, string amount)
     { double k = Convert.ToDouble(amount);
     if(k>0) 
    { return " "; 
    } 
    else return recode;
     }
    
    also added the logical functoid and value mapping in another field like

    When I clicked the Test Map option, I am getting an error message like this

                     

    I am not sure what is going wrong. Can anybody help me with this.

    Thanks

    • Edited by vdha Tuesday, October 28, 2014 3:15 PM
    Tuesday, October 28, 2014 1:54 PM

Answers

  • Hi,

    No, Input parameter values to Logical functoids can be in a variety of data types (string, numeric,Boolean or logical).

    When both input parameters are strings, a case-sensitive string comparison is performed. 

    Rachit

    • Marked as answer by vdha Tuesday, October 28, 2014 6:41 PM
    Tuesday, October 28, 2014 4:12 PM
    Moderator

All replies

  • Hi,

    Please mention what changes you have made in the map post which you have started receiving this error.

    I suspect you made changes related to data conversion inside the map which has caused this.

    Rachit 


    Tuesday, October 28, 2014 3:14 PM
    Moderator
  • Is it may be because I am using the logical functoids with the filed of string type.

    Tuesday, October 28, 2014 3:27 PM
  • Hi,

    No, Input parameter values to Logical functoids can be in a variety of data types (string, numeric,Boolean or logical).

    When both input parameters are strings, a case-sensitive string comparison is performed. 

    Rachit

    • Marked as answer by vdha Tuesday, October 28, 2014 6:41 PM
    Tuesday, October 28, 2014 4:12 PM
    Moderator
  • I used greater than logical functoid with a string field and 0 as input parameters. I am not sure where things going wrong. I couldnot see where the error is happening.
    Tuesday, October 28, 2014 4:14 PM
  • Hello,

    I have made some changes to the existing map and tried to test the map.The Changes I made is adding a scripting functoid with the following code

    public string Code(string recode, string amount)
     { double k = Convert.ToDouble(amount);
     if(k>0) 
    { return " "; 
    } 
    else return recode;
     }

    Here's the problem.

    You can't convert a null value to a meaningful value through Convert.  Your best option is to check for null first and then assign a value of 0 (or whatever) to the result.

    Rachit

    Tuesday, October 28, 2014 4:31 PM
    Moderator
  • I am sorry Rachit, I cannot understand. The string amount is not a null value
    Tuesday, October 28, 2014 4:36 PM
  • public string Code(string recode, string amount)
     { double k = double.Parse(amount,System.Globalization.NumberStyles.Any,CultureInfo.InvariantCulture);
     if(k>0) 
    { return " "; 
    } 
    else return recode;
     }

    Try this.

    Rachit

    Tuesday, October 28, 2014 5:09 PM
    Moderator
  • Thanks Rachit for helping me with this. The Assembly File Version of the project was set as 1.1.* . When I changed that and tried the test map and it worked. Thank you so much.

    • Marked as answer by vdha Tuesday, October 28, 2014 6:42 PM
    • Unmarked as answer by vdha Tuesday, October 28, 2014 6:42 PM
    Tuesday, October 28, 2014 6:41 PM