cancel
Showing results for 
Search instead for 
Did you mean: 

using Xpath in Receiver Determination for greater than 500

Former Member
0 Kudos

Hi,

I am trying to use Xpath in the receiver Determination step and I want to check a field which is at item level and comes multiple times(0-unbounded) greater than 500.I tried with different options per SDN blogs,Xpath functions,but still I couldn't able to get what i am trying.I want to process the message when "quantity" is greater than 500,else I want to ignore the message with no errors.

I gave like this /p1: /LIST/item[quantity>499] EX

item loop is 0-unbounded and I need to check for every quantity.I selected the check box multi line as well.

I played around different options,but still did not get what I am looking for.

please suggest in this regard ,how I need to give the expression.

Thank you,

Sri

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

I need to re open this as my expression works only,if I have one line item and itemquantity > 500,but I need to check at all the line itemsquantities.

if 1st line itemquantity 600

2ns line itemquantity 300

3rd line itemquantity 800,then I should ignore,but the give expression still processing the message.

if all are above 500 then need to process the message.

one or more itemquantities in any one of the line items <500 then I should ignore the message.

please suggest how can I handle this in Xpath.

thank you.

Former Member
0 Kudos

Hi

I think its not possible to handle in Receiver determination,

You can handle this in Message mapping itslef by creating the Target root node by using create if function.

Source -- > UDF -(return true) -- > createif --> Target

Regards

Ramg

Former Member
0 Kudos

Hi,

For validating that the item field is occuring more than 500 times you need to choose the

2.The exact XPath would be in your case *(/p1: /LIST/itemquantity[499]EX)*

This means if the 500 th occurance of the item exists then the condition satisfies that is always true for 500 and above occurance of the item.

Please revert if the suggestion proves to be helpful.

cheers,

Abhishek.

Edited by: Abhishek Paul on May 6, 2010 10:55 PM

Edited by: Abhishek Paul on May 6, 2010 11:02 PM

Edited by: Abhishek Paul on May 6, 2010 11:08 PM

Former Member
0 Kudos

Thank you Ramkumar and Abhishek for replies.

I solved it myself.

I gave like this //LIST/[itemquantity>499] EX and it worked.double forward slash in the front.

Ramkumar,I think you got me wrong.I am not checking for 499th occurence,I need to check for every occurence of itemquantity,if it is greater than value 500 then need to process else ignore the message.

Former Member
0 Kudos

can you try like this

/p1: /LIST[itemquantity > 499 ] EX {/code}

Regards

Ramg

Former Member
0 Kudos

After list open the Square bracket and before EX close the square bracket [

 /p1:/LIST/[itemquantity>499] EX

or

/p1:/LIST/[itemquantity>499]/itemquantity EX

Regards

Ramg