on 09-06-2014 5:51 AM
Hello All,
I am in PI 7.4 and writing a condition to determine interfaces based on the value coming in D_106.
The condition I am checking is (Xpath./p1:ASC850_004010/S_ISA/D_I06 = "1234 ")
The other condition is (Xpath./p1:ASC850_004010/S_ISA/D_I06 != "1234 ")
When the value coming in the message for D_106 is "1234 ", it always executing != "1234 " part.
I think there is something wrong I am doing. Please let me know
thx
mike
Hi Mike,
you can use the Xpath function normalize-space(string) to remove the leading or trailing spaces. refer the below link
XPath, XQuery, and XSLT Function Reference
the other option is to use hexadecimal value for space. refer the expression in below conversation
Locating the node by value containing whitespaces using XPath - Stack Overflow
regards,
Harish
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
This message was moderated.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
To make sure condition is failing due to trailing space(s) .Change the condition as below and remove the space in D_106 field value.
/p1:ASC850_004010/S_ISA/D_I06 = "1234".
If it is due to white spaces ,go through below link for different ways to fix.
xpath expression to remove whitespace - Stack Overflow
Regards
Venkat
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
82 | |
10 | |
10 | |
9 | |
6 | |
6 | |
5 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.