Hi,
Mercator 6.7
850 version 4010 tree.
I'm having an issue joining text strings today.
Here is what I want to do. In the N3 segment, there is an address info element, that can have 1 or 2 occurences.
I am dealing with data that has 2 occurences.
I need to map both occurences into one string, separated by a space. I also need to make sure that I am extracting the correct address, ie the "ST" type.
This is what I have
=EXTRACT(AddressInfo Element[1]:N3 Segment:LoopN1_1:Transaction #850 Inbound Partner Set V4010:Source, EntityIDCd Element:N1 Segment:LoopN1_1:Transaction #850 Inbound Partner Set V4010:Source = "ST" ) + EXTRACT(AddressInfo Element[2]:N3 Segment:LoopN1_1:Transaction #850 Inbound Partner Set V4010:Source, EntityIDCd Element:N1 Segment:LoopN1_1:Transaction #850 Inbound Partner Set V4010:Source = "ST" )
This actualy works, gets both pieces of data, for the correct ST address. However, when I add a space between them, all I get is the space, and no data.
This is what I want, but does not work
=EXTRACT(AddressInfo Element[1]:N3 Segment:LoopN1_1:Transaction #850 Inbound Partner Set V4010:Source, EntityIDCd Element:N1 Segment:LoopN1_1:Transaction #850 Inbound Partner Set V4010:Source = "ST" ) + " " + EXTRACT(AddressInfo Element[2]:N3 Segment:LoopN1_1:Transaction #850 Inbound Partner Set V4010:Source, EntityIDCd Element:N1 Segment:LoopN1_1:Transaction #850 Inbound Partner Set V4010:Source = "ST" )
Putting is the extra space seems to blow the rest of the data away.
Is there a way to make this work, or is there a better way to accomplish the same thing.
Any help appreciated.
Thanks
Max
Mercator 6.7
850 version 4010 tree.
I'm having an issue joining text strings today.
Here is what I want to do. In the N3 segment, there is an address info element, that can have 1 or 2 occurences.
I am dealing with data that has 2 occurences.
I need to map both occurences into one string, separated by a space. I also need to make sure that I am extracting the correct address, ie the "ST" type.
This is what I have
=EXTRACT(AddressInfo Element[1]:N3 Segment:LoopN1_1:Transaction #850 Inbound Partner Set V4010:Source, EntityIDCd Element:N1 Segment:LoopN1_1:Transaction #850 Inbound Partner Set V4010:Source = "ST" ) + EXTRACT(AddressInfo Element[2]:N3 Segment:LoopN1_1:Transaction #850 Inbound Partner Set V4010:Source, EntityIDCd Element:N1 Segment:LoopN1_1:Transaction #850 Inbound Partner Set V4010:Source = "ST" )
This actualy works, gets both pieces of data, for the correct ST address. However, when I add a space between them, all I get is the space, and no data.
This is what I want, but does not work
=EXTRACT(AddressInfo Element[1]:N3 Segment:LoopN1_1:Transaction #850 Inbound Partner Set V4010:Source, EntityIDCd Element:N1 Segment:LoopN1_1:Transaction #850 Inbound Partner Set V4010:Source = "ST" ) + " " + EXTRACT(AddressInfo Element[2]:N3 Segment:LoopN1_1:Transaction #850 Inbound Partner Set V4010:Source, EntityIDCd Element:N1 Segment:LoopN1_1:Transaction #850 Inbound Partner Set V4010:Source = "ST" )
Putting is the extra space seems to blow the rest of the data away.
Is there a way to make this work, or is there a better way to accomplish the same thing.
Any help appreciated.
Thanks
Max