This discussion is archived
1 Reply Latest reply: Sep 5, 2012 11:29 AM by 700638 RSS

XQUERY Count function

JP Newbie
Currently Being Moderated
Hi,

I have an xquery statement below. The count function, even though im looping through each line item, it always returns a multiple result making my if condition always false. Any suggestions?


for $LineItem in $LineItemList//ns1:OrderItem
if (
(upper-case(data($LineItem/ns1:Action))="UPDATE" and
count(data($LineItem/ns1:ListOfOrderItemXA/ns1:OrderItemXA[ns1:ActionCode="Update"]/ns1:ActionCode))=0))

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points