cancel
Showing results for 
Search instead for 
Did you mean: 

EX operator in standard receiver determination does not seem to be working

Former Member
0 Kudos

Hi,

I understand that the "EX" operator in an XPath check the existence of a node.

So, if I write something lke this ->

((/MAIN/NODE1[NODE2 = 'x']) EX)

This means that the condition will eval to true or false ONLY if the node exists?

For some reason I cannot get this to work properly.

(Note: In the actual scenario, I have an IDOC and I wish to perform a similar check on a tag that may or may not exist depending upon the situation).

Cheers,

Earlence

Accepted Solutions (1)

Accepted Solutions (1)

former_member200962
Active Contributor
0 Kudos
((/MAIN/NODE1NODE2 = 'x') EX)
This means that the condition will eval to true or false ONLY if the node exists?
(Note: In the actual scenario, I have an IDOC and I wish to perform a similar check on a tag that may or may not exist depending 
upon the situation).

If your requirement is to check if a node exists or not then below is the condition which you should be using:

Left Operand: /MAIN/NODE1/NODE2

Middle Operand: EX

NO right operand in this case

Regards,

Abhishek.

Former Member
0 Kudos

Hi,

I have tried it, but still an error is thrown in receiver determination

Eg: this is what I am using

(/MAIN/NODE1/NODE2 EX AND /MAIN/NODE1/NODE2 = '')

By this, It is supposed to check existence of NODE2 and THEN check the contents.

When I send a payload with NODE2 tag not existing, it fails in receiver determination

I have tried with double quotes also instead of single quotes.

Cheers,

Earlence

former_member200962
Active Contributor
0 Kudos
(/MAIN/NODE1/NODE2 EX AND /MAIN/NODE1/NODE2 = '')

If you requirement is to check if the node exists and has some value (i.e. should not be blank), the below should work:

(/MAIN/NODE1/NODE2 EX AND /MAIN/NODE1/NODE2 notEqual_fromDropdown)

No single/ double quotes are to be given.....in the second part of the condition use the not Equal operator.....and the right operand should be kept blank....do not fill any value

Regards,

Abhishek.

Former Member
0 Kudos

Hi,

it says that XPath expression cannot be empty

former_member200962
Active Contributor
0 Kudos

>

> Hi,

> it says that XPath expression cannot be empty

I mentioned to keep the right operand as blank and not the left operand

The left Operand is where you select the XPATH for the node.

Regards,

Abhishek.

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi,

Try this .. ((/MAIN/NODE1NODE2 = "x") EX). Use double coats instead of single. It should work.

Regards,

Sarvesh