Integration problem with string manipulation

Integration problem with string manipulation

  
Hello everybody,

i was busy to try out integration studio but i doesnt work;

new action

one input parameter
one output parameter
(both text format)

open in vs2008

public void MssFirstDayOfMonth(string ssInputDate, out string ssOutputDate) {

 // TODO: Write implementation for action

 

ssInputDate.Replace(ssInputDate[0], '0');

ssInputDate.Replace(ssInputDate[1], '1');

ssOutputDate = ssInputDate;

} // MssFirstDayOfMonth


When I add the action in my espace it doesn't edit my string (char 1 and 2 should be changed).




 

Hi Frits,

If you go to C# .Net's reference, at MSDN, you would read that the Replace method does not change the string itself, but returns a string with the replaced values.

String.Replace method - MSDN

So, indeed, what you should be doing is:

public void MssFirstDayOfMonth(string ssInputDate, out string ssOutputDate) {

 // TODO: Write implementation for action

ssInputDate = ssInputDate.Replace(ssInputDate[0], '0');

ssInputDate = ssInputDate.Replace(ssInputDate[1], '1');

ssOutputDate = ssInputDate;

} // MssFirstDayOfMonth


Let us know if this works.

Regards,

Paulo Tavares