在Biztalk映射器中如何使用拆分数组概念 [英] In Biztalk mapper how to use split array concept

查看:85
本文介绍了在Biztalk映射器中如何使用拆分数组概念的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

以下部分为必填项.请给一个解决方案.

Required suggestion on below part.please any one give solution.

我们已经从850映射到FlatFile

We have mapping from 850 to FlatFile

X12/PO1Loop1/PO1/PO109,我需要映射到字段" VALUE ",该字段在Option记录下,是不受限制的.

X12/PO1Loop1/PO1/PO109 and I need to map to field VALUE which is under record Option which is unbounded.

将PO109拆分为以'.'分隔的子字符串,在第一个字符串之后进行forsub递减,并使用value = substring创建新的Option

Split PO109 into substrings delimited by '.', foreach subsring after the first, create new Option with value=substring

因此,在输入样本中,我们的值类似于147895632qwerqtyuui.789456123321456987

So in input sample we have value like 147895632qwerqtyuui.789456123321456987

类似地,该字段在POLoop1下重复出现.

Similarly the field repeats under POLoop1.

所以我需要基于(.)分割值,然后将值传递给选项记录(无界)下的value字段.

So I need to split value based on (.) then pass a value to value field under option record(unbounded).

我尝试使用下面的代码段

I tried using below code snippet

public string SplitValues(string strValue)
{

string[] arrValue = strValue.Split(".".ToCharArray());  
 foreach (string strDisplay in arrValue)  
 {
return strDisplay; 
}

}

但是它不起作用,而且我对String方法并不十分熟悉,并且不确定是否有简单的方法可以做到这一点.我有一个字符串,其中包含几个用."分隔的值.

But it doesn't works, and I am not really familiar with the String methods and I am not sure if there's an easy way to do this. I have a String which contains couple of values delimited with "." .

所以我需要基于delimiter(.)分隔值并将值传递给字段.

So I need to separate values based on delimiter(.) and pass value to field.

我该怎么做

推荐答案

正如我提到的,不太清楚您的目标是什么,但我认为您想将具有某种分隔符的节点拆分为多个节点...如果是这样,请尝试以下操作: https://seroter.wordpress.com/2008/10/07/splitting-delimited-values-in-biztalk-maps/

As I mentioned, not too clear what is your objective, but I think you want to split a node that has some kind of delimiter into multiple nodes... if so, Try this: https://seroter.wordpress.com/2008/10/07/splitting-delimited-values-in-biztalk-maps/

他就是这么做的.给定一个以 a | b | c | d 为值的节点,输出多个节点,每个节点包含被 | 分割后的值,因此node1 = a,node2 = b,node3 = c,node4 = d.

He is doing exactly that. Given a node with a|b|c|d as value, output multiple nodes, each containing the value after splitted by |, so node1 = a, node2 = b, node3 = c, node4 = d.

这篇关于在Biztalk映射器中如何使用拆分数组概念的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆