i have a requirement like i need to get the first 30 characters or first line whichever occurs first(if there is a line break)
could you please let me know the inline C# code to get that in Scripting functiod
What you can do is
1. Create a flat file schema with a single field with CRLF as delimiter.
So your second problem is solved.....Getting first row.
2. Now we need to get max 30 characters from this first row.
You can use a inline C# functiod with C# code as
public string Get30Chars(string strFirstRow)
if (strFirstRow.Length >= 30)
return strFirstRow.Substring(0, 30);
return strFirstRow.Substring(0, strFirstRow.Length);
Regards,NISHIL MCT,MCTS | Freelance BizTalk Consultant.biztalkconnect.blogspot.com
i need to get the second 30 characters if there is no line break and second line when there is a line break
First use the count functoid to get the count of records.
If count=1 then get second 30 chars using similar c# code as I sent before ....change the substring index.
If count>1 then use the index functoid and map the value for index=2. So it will pick the data from second row.