|
Home > Archive > BizTalk Server Orchestration > September 2005 > Inline CSharp scripting functoid
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
Inline CSharp scripting functoid
|
|
| Pankaj 2005-09-15, 7:48 am |
| I am using a simple inline CSharp scripting functoid
public string Convert(string str)
{
int intstr = 0 ;
try
{
intstr = System.Convert.ToInt32(str);
}
catch(Exception ex)
{
ex=ex;
return str;
}
return intstr.ToString();
}
I am configuring an input xml field element as an input to this functoid.
Some how I am not able to get the desired output.
The purpose is , if the input element is integer with preceding zeroes,
remove the zeroes else treat input as a string.
I am not sure how this function's 'Convert(string str)' input parameters get
set to the input of the functoid.
Let me know what is going wrong?
Regards
| |
| Nicholas 2005-09-15, 5:59 pm |
| Just wondering but is the name of the field your passing actually str? I've
been tripped up by these types of stupid issues several times myself. If you
replace str with the name of the field you are linking to the functoid you
should be ok. Let me know how that works.
Nicholas
"Pankaj" wrote:
> I am using a simple inline CSharp scripting functoid
>
> public string Convert(string str)
> {
> int intstr = 0 ;
> try
> {
> intstr = System.Convert.ToInt32(str);
> }
> catch(Exception ex)
> {
> ex=ex;
> return str;
> }
> return intstr.ToString();
> }
>
> I am configuring an input xml field element as an input to this functoid.
> Some how I am not able to get the desired output.
> The purpose is , if the input element is integer with preceding zeroes,
> remove the zeroes else treat input as a string.
>
> I am not sure how this function's 'Convert(string str)' input parameters get
> set to the input of the functoid.
>
> Let me know what is going wrong?
>
> Regards
>
|
|
|
|
|