Extraction Sender and Receiver from Document Type

Hello,

I want to ask you for help.Maybe anybody had the same problem and solve it already.

I have a new document type in TN and I need to extract Sender and Receiver ID from Message.
Here is segment where sender and receiver are defined.

SENDER_ID RECEIVER_ID

I don’t know how to extract SENDER_ID and Sender from PartnerRole together to be sure that this ID is Sender.

I tried this XQLs
/Parties[0]/PartyInformation[0]/@PartnerRole $union$ /Parties[0]/PartyInformation[0]/PartnerIdentifier
But this is not possible to save.

Then I found solution in User guide:
/Parties[0]/PartyInformation[@PartnerRole ‘eq’ ‘Sender’]/PartnerIdentifier
But it returns error that “@PartnerRole ‘eq’ ‘Sender’” is not number.

Anybody knows how to extract value from element on basis of his attribute?

Thank you for your help

Try and this should work:

/Parties[0]/PartyInformation[@PartnerRole $eq$ ‘Sender’]/PartnerIdentifier

HTH,
RMG

Thank you,
it works.I already tried this XQL query befor, but it doesn’t work inside Document Type details.When I upload test file and set extraction of SenderID with this query it always throws parse error exception.:confused:

After you replay i try to send file to TN using http and it works.Strange. :confused:

Thank you for your help

Glad to hear it worked out better!