on 12-06-2013 7:58 PM
Hi
I am having the following issue in receiver determination .
I need to check primarydocrefnum starts with 65 will go to file reciver and not start with 65 will go to IDOC . This condition is working fine with the following syntax for both the receivers
/p1:OrderResp/p1:Control/p1:DocumentIdentification/p1:PrimaryDocuRefNum[not(starts-with(.,"65"))] for idoc
/p1:OrderResp/p1:Control/p1:DocumentIdentification/p1:PrimaryDocutRefNum[(starts-with(.,"65"))] for file
I used EX for both and it worked for above conditions for respective receivers
But I need to add one more .Our sourcesystemid examplle T120-TEST
If the source systme Id ends with TEST and if satisfies first condition ,it shoudl send for the respetive receivers else ignore
I tried with following options and none of them worked
/p1:OrderResp/p1:Control/p1:DocumentIdentification/p1:SourceSystemID[(ends-with(.,"TEST"))]
2)
/p1:OrderResp/p1:Control/p1:DocumentIdentification/p1:[substring(SourceSystemId,6,9)="TEST"] (id may not be always 5chars before -.I just tried
I tried with single quotes also. Any other options for this.I tried with substring 5,8 also
After adding the above 2nd condition I am getting receiver could not be determined
Is there any syntax avaliable ?
Thanks for your help
This worked without any substring or contains.It worked with content pattern
p1:OrderResp/p1:Control/p1:DocumentIdentification/p1:SourceSystemID
*TEST with content pattern
Thanks
Mahesh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Mahesh,
Also try with contains xpath function.
/p1:OrderResp/p1:Control/p1:DocumentIdentification[(contains(SourceSystemID,'TEST'))]
please also define the Prefix p1 in the condition editor so you do not need to define it before every node in expression.
hope this help.
Harish
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Pls try /p1:OrderResp/p1:Control/p1:DocumentIdentification/p1:SourceSystemID[(substring(.,string-length(.) - 4) = 'TEST')]
i don't think Xpath 1.0 supports ends with function..
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
76 | |
9 | |
8 | |
7 | |
6 | |
5 | |
5 | |
5 | |
5 | |
5 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.