XQL syntax

Can any one help me with XQL query syntax? extract value from a xml document to set GroupID in TN

Here is a sample XML

<idoc>
<edi_dc40>
<mestyp>DESADV</mestyp>
<mescod>CS</mescod>
<mesfct></mesfct>
</edi_dc40>
<e1edkt3>
<tdid>001</tdid>
<tsspras>E</tsspras>
<e1edkt4>
<tdline>MERCHANT: 7</tdline>
</e1edkt4>
<e1edkt4>
<tdline>PROJECTID: 10</tdline>
</e1edkt4>
<e1edkt4>
<tdline>STORAGEID: 0000060012</tdline>
</e1edkt4>
</e1edkt3>
</idoc>

If MESCOD=CS then GroupID = MERCHANTID (7)
else GroupID = ProjectID (10)

thanks

I don’t see a way you can do this directly with XQL.

My suggestion would be to transform your original doc as best you can - and use a BRANCH to map the desired value for GroupID.

(consider writing a helper flow like setGroupId to do that work for you to make your flow more readable)

yes, that is the only way to do this. I was hoping to get a better way to do this from forum.

Even If I pull the information, I cannot update the GroupID since it is a System Attribute.

So I have to update doc before submission and extract in TN