1
Answer

BizTalk Issue:How to use substring function in orchestration

Photo of JAYDIP PATIL

JAYDIP PATIL

8y
1.6k
1
BizTalk Issue:How to use substring function in orchestration shape?
 
 
Plesae suggest solution

Answers (1)

1
Photo of Sandip G. Patil
550 2k 244.7k 8y
Just try with following things,
There's a few things you can't access directly it the Orchestration designer, like Generics and Typed Arrays.
If you need string.Split, you'll have to use a helper class.

In a helper class add method like,

public static string GetSourceDate(string receiverGSSegment)
{
string srcDate = string.Empty;
if (!String.IsNullOrEmpty(receiverGSSegment))
{
srcDate = receiverGSSegment.Split('*').ToArray()[4].Substring(0, 4) + '-' + receiverGSSegment.Split('*').ToArray()[4].Substring(4, 2) + '-' + receiverGSSegment.Split('*').ToArray()[4].Substring(6, 2);
}
return srcDate;
}

And use it in Orchestration shape like,
 
Accepted